Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314717
b: refs/heads/master
c: 3840a06
h: refs/heads/master
i:
  314715: fa76125
v: v3
  • Loading branch information
Neal Cardwell authored and David S. Miller committed Jun 29, 2012
1 parent efaf4ec commit a538eed
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9247869ee661b046510c19a36cf0d91d9c2639d3
refs/heads/master: 3840a06e6046aaee95f33a120499d2dc8c054b9d
1 change: 1 addition & 0 deletions trunk/include/net/inet6_connection_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ extern int inet6_csk_bind_conflict(const struct sock *sk,
const struct inet_bind_bucket *tb, bool relax);

extern struct dst_entry* inet6_csk_route_req(struct sock *sk,
struct flowi6 *fl6,
const struct request_sock *req);

extern struct request_sock *inet6_csk_search_req(const struct sock *sk,
Expand Down
26 changes: 13 additions & 13 deletions trunk/net/ipv6/inet6_connection_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,26 @@ int inet6_csk_bind_conflict(const struct sock *sk,
EXPORT_SYMBOL_GPL(inet6_csk_bind_conflict);

struct dst_entry *inet6_csk_route_req(struct sock *sk,
struct flowi6 *fl6,
const struct request_sock *req)
{
struct inet6_request_sock *treq = inet6_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *final_p, final;
struct dst_entry *dst;
struct flowi6 fl6;

memset(&fl6, 0, sizeof(fl6));
fl6.flowi6_proto = IPPROTO_TCP;
fl6.daddr = treq->rmt_addr;
final_p = fl6_update_dst(&fl6, np->opt, &final);
fl6.saddr = treq->loc_addr;
fl6.flowi6_oif = treq->iif;
fl6.flowi6_mark = sk->sk_mark;
fl6.fl6_dport = inet_rsk(req)->rmt_port;
fl6.fl6_sport = inet_rsk(req)->loc_port;
security_req_classify_flow(req, flowi6_to_flowi(&fl6));

dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false);
memset(fl6, 0, sizeof(*fl6));
fl6->flowi6_proto = IPPROTO_TCP;
fl6->daddr = treq->rmt_addr;
final_p = fl6_update_dst(fl6, np->opt, &final);
fl6->saddr = treq->loc_addr;
fl6->flowi6_oif = treq->iif;
fl6->flowi6_mark = sk->sk_mark;
fl6->fl6_dport = inet_rsk(req)->rmt_port;
fl6->fl6_sport = inet_rsk(req)->loc_port;
security_req_classify_flow(req, flowi6_to_flowi(fl6));

dst = ip6_dst_lookup_flow(sk, fl6, final_p, false);
if (IS_ERR(dst))
return NULL;

Expand Down
9 changes: 6 additions & 3 deletions trunk/net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,8 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
}


static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req,
static int tcp_v6_send_synack(struct sock *sk,
struct request_sock *req,
struct request_values *rvp,
u16 queue_mapping)
{
Expand Down Expand Up @@ -1058,6 +1059,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
struct tcp_sock *tp = tcp_sk(sk);
__u32 isn = TCP_SKB_CB(skb)->when;
struct dst_entry *dst = NULL;
struct flowi6 fl6;
bool want_cookie = false;

if (skb->protocol == htons(ETH_P_IP))
Expand Down Expand Up @@ -1177,7 +1179,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
*/
if (tmp_opt.saw_tstamp &&
tcp_death_row.sysctl_tw_recycle &&
(dst = inet6_csk_route_req(sk, req)) != NULL &&
(dst = inet6_csk_route_req(sk, &fl6, req)) != NULL &&
(peer = rt6_get_peer((struct rt6_info *)dst)) != NULL &&
ipv6_addr_equal((struct in6_addr *)peer->daddr.addr.a6,
&treq->rmt_addr)) {
Expand Down Expand Up @@ -1247,6 +1249,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
#ifdef CONFIG_TCP_MD5SIG
struct tcp_md5sig_key *key;
#endif
struct flowi6 fl6;

if (skb->protocol == htons(ETH_P_IP)) {
/*
Expand Down Expand Up @@ -1309,7 +1312,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
goto out_overflow;

if (!dst) {
dst = inet6_csk_route_req(sk, req);
dst = inet6_csk_route_req(sk, &fl6, req);
if (!dst)
goto out;
}
Expand Down

0 comments on commit a538eed

Please sign in to comment.