diff options
author | Eric Dumazet <edumazet@google.com> | 2013-10-09 18:21:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-10 00:08:07 -0400 |
commit | 634fb979e8f3a70f04c1f2f519d0cd1142eb5c1a (patch) | |
tree | ffd7f7ef4a313c94859180d1bc20f2713a11f987 /net/ipv6 | |
parent | 8a29111c7ca68d928dfab58636f3f6acf0ac04f7 (diff) |
inet: includes a sock_common in request_sock
TCP listener refactoring, part 5 :
We want to be able to insert request sockets (SYN_RECV) into main
ehash table instead of the per listener hash table to allow RCU
lookups and remove listener lock contention.
This patch includes the needed struct sock_common in front
of struct request_sock
This means there is no more inet6_request_sock IPv6 specific
structure.
Following inet_request_sock fields were renamed as they became
macros to reference fields from struct sock_common.
Prefix ir_ was chosen to avoid name collisions.
loc_port -> ir_loc_port
loc_addr -> ir_loc_addr
rmt_addr -> ir_rmt_addr
rmt_port -> ir_rmt_port
iif -> ir_iif
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/inet6_connection_sock.c | 26 | ||||
-rw-r--r-- | net/ipv6/syncookies.c | 24 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 61 |
3 files changed, 55 insertions, 56 deletions
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index b7400b480e74..1317c569b58f 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c | |||
@@ -70,20 +70,20 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk, | |||
70 | struct flowi6 *fl6, | 70 | struct flowi6 *fl6, |
71 | const struct request_sock *req) | 71 | const struct request_sock *req) |
72 | { | 72 | { |
73 | struct inet6_request_sock *treq = inet6_rsk(req); | 73 | struct inet_request_sock *ireq = inet_rsk(req); |
74 | struct ipv6_pinfo *np = inet6_sk(sk); | 74 | struct ipv6_pinfo *np = inet6_sk(sk); |
75 | struct in6_addr *final_p, final; | 75 | struct in6_addr *final_p, final; |
76 | struct dst_entry *dst; | 76 | struct dst_entry *dst; |
77 | 77 | ||
78 | memset(fl6, 0, sizeof(*fl6)); | 78 | memset(fl6, 0, sizeof(*fl6)); |
79 | fl6->flowi6_proto = IPPROTO_TCP; | 79 | fl6->flowi6_proto = IPPROTO_TCP; |
80 | fl6->daddr = treq->rmt_addr; | 80 | fl6->daddr = ireq->ir_v6_rmt_addr; |
81 | final_p = fl6_update_dst(fl6, np->opt, &final); | 81 | final_p = fl6_update_dst(fl6, np->opt, &final); |
82 | fl6->saddr = treq->loc_addr; | 82 | fl6->saddr = ireq->ir_v6_loc_addr; |
83 | fl6->flowi6_oif = treq->iif; | 83 | fl6->flowi6_oif = ireq->ir_iif; |
84 | fl6->flowi6_mark = sk->sk_mark; | 84 | fl6->flowi6_mark = sk->sk_mark; |
85 | fl6->fl6_dport = inet_rsk(req)->rmt_port; | 85 | fl6->fl6_dport = ireq->ir_rmt_port; |
86 | fl6->fl6_sport = inet_rsk(req)->loc_port; | 86 | fl6->fl6_sport = ireq->ir_loc_port; |
87 | security_req_classify_flow(req, flowi6_to_flowi(fl6)); | 87 | security_req_classify_flow(req, flowi6_to_flowi(fl6)); |
88 | 88 | ||
89 | dst = ip6_dst_lookup_flow(sk, fl6, final_p, false); | 89 | dst = ip6_dst_lookup_flow(sk, fl6, final_p, false); |
@@ -129,13 +129,13 @@ struct request_sock *inet6_csk_search_req(const struct sock *sk, | |||
129 | lopt->nr_table_entries)]; | 129 | lopt->nr_table_entries)]; |
130 | (req = *prev) != NULL; | 130 | (req = *prev) != NULL; |
131 | prev = &req->dl_next) { | 131 | prev = &req->dl_next) { |
132 | const struct inet6_request_sock *treq = inet6_rsk(req); | 132 | const struct inet_request_sock *ireq = inet_rsk(req); |
133 | 133 | ||
134 | if (inet_rsk(req)->rmt_port == rport && | 134 | if (ireq->ir_rmt_port == rport && |
135 | req->rsk_ops->family == AF_INET6 && | 135 | req->rsk_ops->family == AF_INET6 && |
136 | ipv6_addr_equal(&treq->rmt_addr, raddr) && | 136 | ipv6_addr_equal(&ireq->ir_v6_rmt_addr, raddr) && |
137 | ipv6_addr_equal(&treq->loc_addr, laddr) && | 137 | ipv6_addr_equal(&ireq->ir_v6_loc_addr, laddr) && |
138 | (!treq->iif || treq->iif == iif)) { | 138 | (!ireq->ir_iif || ireq->ir_iif == iif)) { |
139 | WARN_ON(req->sk != NULL); | 139 | WARN_ON(req->sk != NULL); |
140 | *prevp = prev; | 140 | *prevp = prev; |
141 | return req; | 141 | return req; |
@@ -153,8 +153,8 @@ void inet6_csk_reqsk_queue_hash_add(struct sock *sk, | |||
153 | { | 153 | { |
154 | struct inet_connection_sock *icsk = inet_csk(sk); | 154 | struct inet_connection_sock *icsk = inet_csk(sk); |
155 | struct listen_sock *lopt = icsk->icsk_accept_queue.listen_opt; | 155 | struct listen_sock *lopt = icsk->icsk_accept_queue.listen_opt; |
156 | const u32 h = inet6_synq_hash(&inet6_rsk(req)->rmt_addr, | 156 | const u32 h = inet6_synq_hash(&inet_rsk(req)->ir_v6_rmt_addr, |
157 | inet_rsk(req)->rmt_port, | 157 | inet_rsk(req)->ir_rmt_port, |
158 | lopt->hash_rnd, lopt->nr_table_entries); | 158 | lopt->hash_rnd, lopt->nr_table_entries); |
159 | 159 | ||
160 | reqsk_queue_hash_req(&icsk->icsk_accept_queue, h, req, timeout); | 160 | reqsk_queue_hash_req(&icsk->icsk_accept_queue, h, req, timeout); |
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c index d703218a653b..bc5698f9e4cd 100644 --- a/net/ipv6/syncookies.c +++ b/net/ipv6/syncookies.c | |||
@@ -150,7 +150,6 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
150 | { | 150 | { |
151 | struct tcp_options_received tcp_opt; | 151 | struct tcp_options_received tcp_opt; |
152 | struct inet_request_sock *ireq; | 152 | struct inet_request_sock *ireq; |
153 | struct inet6_request_sock *ireq6; | ||
154 | struct tcp_request_sock *treq; | 153 | struct tcp_request_sock *treq; |
155 | struct ipv6_pinfo *np = inet6_sk(sk); | 154 | struct ipv6_pinfo *np = inet6_sk(sk); |
156 | struct tcp_sock *tp = tcp_sk(sk); | 155 | struct tcp_sock *tp = tcp_sk(sk); |
@@ -187,7 +186,6 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
187 | goto out; | 186 | goto out; |
188 | 187 | ||
189 | ireq = inet_rsk(req); | 188 | ireq = inet_rsk(req); |
190 | ireq6 = inet6_rsk(req); | ||
191 | treq = tcp_rsk(req); | 189 | treq = tcp_rsk(req); |
192 | treq->listener = NULL; | 190 | treq->listener = NULL; |
193 | 191 | ||
@@ -195,22 +193,22 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
195 | goto out_free; | 193 | goto out_free; |
196 | 194 | ||
197 | req->mss = mss; | 195 | req->mss = mss; |
198 | ireq->rmt_port = th->source; | 196 | ireq->ir_rmt_port = th->source; |
199 | ireq->loc_port = th->dest; | 197 | ireq->ir_loc_port = th->dest; |
200 | ireq6->rmt_addr = ipv6_hdr(skb)->saddr; | 198 | ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr; |
201 | ireq6->loc_addr = ipv6_hdr(skb)->daddr; | 199 | ireq->ir_v6_loc_addr = ipv6_hdr(skb)->daddr; |
202 | if (ipv6_opt_accepted(sk, skb) || | 200 | if (ipv6_opt_accepted(sk, skb) || |
203 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || | 201 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || |
204 | np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) { | 202 | np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) { |
205 | atomic_inc(&skb->users); | 203 | atomic_inc(&skb->users); |
206 | ireq6->pktopts = skb; | 204 | ireq->pktopts = skb; |
207 | } | 205 | } |
208 | 206 | ||
209 | ireq6->iif = sk->sk_bound_dev_if; | 207 | ireq->ir_iif = sk->sk_bound_dev_if; |
210 | /* So that link locals have meaning */ | 208 | /* So that link locals have meaning */ |
211 | if (!sk->sk_bound_dev_if && | 209 | if (!sk->sk_bound_dev_if && |
212 | ipv6_addr_type(&ireq6->rmt_addr) & IPV6_ADDR_LINKLOCAL) | 210 | ipv6_addr_type(&ireq->ir_v6_rmt_addr) & IPV6_ADDR_LINKLOCAL) |
213 | ireq6->iif = inet6_iif(skb); | 211 | ireq->ir_iif = inet6_iif(skb); |
214 | 212 | ||
215 | req->expires = 0UL; | 213 | req->expires = 0UL; |
216 | req->num_retrans = 0; | 214 | req->num_retrans = 0; |
@@ -234,12 +232,12 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
234 | struct flowi6 fl6; | 232 | struct flowi6 fl6; |
235 | memset(&fl6, 0, sizeof(fl6)); | 233 | memset(&fl6, 0, sizeof(fl6)); |
236 | fl6.flowi6_proto = IPPROTO_TCP; | 234 | fl6.flowi6_proto = IPPROTO_TCP; |
237 | fl6.daddr = ireq6->rmt_addr; | 235 | fl6.daddr = ireq->ir_v6_rmt_addr; |
238 | final_p = fl6_update_dst(&fl6, np->opt, &final); | 236 | final_p = fl6_update_dst(&fl6, np->opt, &final); |
239 | fl6.saddr = ireq6->loc_addr; | 237 | fl6.saddr = ireq->ir_v6_loc_addr; |
240 | fl6.flowi6_oif = sk->sk_bound_dev_if; | 238 | fl6.flowi6_oif = sk->sk_bound_dev_if; |
241 | fl6.flowi6_mark = sk->sk_mark; | 239 | fl6.flowi6_mark = sk->sk_mark; |
242 | fl6.fl6_dport = inet_rsk(req)->rmt_port; | 240 | fl6.fl6_dport = ireq->ir_rmt_port; |
243 | fl6.fl6_sport = inet_sk(sk)->inet_sport; | 241 | fl6.fl6_sport = inet_sk(sk)->inet_sport; |
244 | security_req_classify_flow(req, flowi6_to_flowi(&fl6)); | 242 | security_req_classify_flow(req, flowi6_to_flowi(&fl6)); |
245 | 243 | ||
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 541dfc40c7b3..db234d609b33 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -465,7 +465,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, | |||
465 | struct request_sock *req, | 465 | struct request_sock *req, |
466 | u16 queue_mapping) | 466 | u16 queue_mapping) |
467 | { | 467 | { |
468 | struct inet6_request_sock *treq = inet6_rsk(req); | 468 | struct inet_request_sock *ireq = inet_rsk(req); |
469 | struct ipv6_pinfo *np = inet6_sk(sk); | 469 | struct ipv6_pinfo *np = inet6_sk(sk); |
470 | struct sk_buff * skb; | 470 | struct sk_buff * skb; |
471 | int err = -ENOMEM; | 471 | int err = -ENOMEM; |
@@ -477,9 +477,10 @@ static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, | |||
477 | skb = tcp_make_synack(sk, dst, req, NULL); | 477 | skb = tcp_make_synack(sk, dst, req, NULL); |
478 | 478 | ||
479 | if (skb) { | 479 | if (skb) { |
480 | __tcp_v6_send_check(skb, &treq->loc_addr, &treq->rmt_addr); | 480 | __tcp_v6_send_check(skb, &ireq->ir_v6_loc_addr, |
481 | &ireq->ir_v6_rmt_addr); | ||
481 | 482 | ||
482 | fl6->daddr = treq->rmt_addr; | 483 | fl6->daddr = ireq->ir_v6_rmt_addr; |
483 | skb_set_queue_mapping(skb, queue_mapping); | 484 | skb_set_queue_mapping(skb, queue_mapping); |
484 | err = ip6_xmit(sk, skb, fl6, np->opt, np->tclass); | 485 | err = ip6_xmit(sk, skb, fl6, np->opt, np->tclass); |
485 | err = net_xmit_eval(err); | 486 | err = net_xmit_eval(err); |
@@ -502,7 +503,7 @@ static int tcp_v6_rtx_synack(struct sock *sk, struct request_sock *req) | |||
502 | 503 | ||
503 | static void tcp_v6_reqsk_destructor(struct request_sock *req) | 504 | static void tcp_v6_reqsk_destructor(struct request_sock *req) |
504 | { | 505 | { |
505 | kfree_skb(inet6_rsk(req)->pktopts); | 506 | kfree_skb(inet_rsk(req)->pktopts); |
506 | } | 507 | } |
507 | 508 | ||
508 | #ifdef CONFIG_TCP_MD5SIG | 509 | #ifdef CONFIG_TCP_MD5SIG |
@@ -521,7 +522,7 @@ static struct tcp_md5sig_key *tcp_v6_md5_lookup(struct sock *sk, | |||
521 | static struct tcp_md5sig_key *tcp_v6_reqsk_md5_lookup(struct sock *sk, | 522 | static struct tcp_md5sig_key *tcp_v6_reqsk_md5_lookup(struct sock *sk, |
522 | struct request_sock *req) | 523 | struct request_sock *req) |
523 | { | 524 | { |
524 | return tcp_v6_md5_do_lookup(sk, &inet6_rsk(req)->rmt_addr); | 525 | return tcp_v6_md5_do_lookup(sk, &inet_rsk(req)->ir_v6_rmt_addr); |
525 | } | 526 | } |
526 | 527 | ||
527 | static int tcp_v6_parse_md5_keys (struct sock *sk, char __user *optval, | 528 | static int tcp_v6_parse_md5_keys (struct sock *sk, char __user *optval, |
@@ -623,8 +624,8 @@ static int tcp_v6_md5_hash_skb(char *md5_hash, struct tcp_md5sig_key *key, | |||
623 | saddr = &inet6_sk(sk)->saddr; | 624 | saddr = &inet6_sk(sk)->saddr; |
624 | daddr = &sk->sk_v6_daddr; | 625 | daddr = &sk->sk_v6_daddr; |
625 | } else if (req) { | 626 | } else if (req) { |
626 | saddr = &inet6_rsk(req)->loc_addr; | 627 | saddr = &inet_rsk(req)->ir_v6_loc_addr; |
627 | daddr = &inet6_rsk(req)->rmt_addr; | 628 | daddr = &inet_rsk(req)->ir_v6_rmt_addr; |
628 | } else { | 629 | } else { |
629 | const struct ipv6hdr *ip6h = ipv6_hdr(skb); | 630 | const struct ipv6hdr *ip6h = ipv6_hdr(skb); |
630 | saddr = &ip6h->saddr; | 631 | saddr = &ip6h->saddr; |
@@ -949,7 +950,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
949 | { | 950 | { |
950 | struct tcp_options_received tmp_opt; | 951 | struct tcp_options_received tmp_opt; |
951 | struct request_sock *req; | 952 | struct request_sock *req; |
952 | struct inet6_request_sock *treq; | 953 | struct inet_request_sock *ireq; |
953 | struct ipv6_pinfo *np = inet6_sk(sk); | 954 | struct ipv6_pinfo *np = inet6_sk(sk); |
954 | struct tcp_sock *tp = tcp_sk(sk); | 955 | struct tcp_sock *tp = tcp_sk(sk); |
955 | __u32 isn = TCP_SKB_CB(skb)->when; | 956 | __u32 isn = TCP_SKB_CB(skb)->when; |
@@ -994,25 +995,25 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
994 | tmp_opt.tstamp_ok = tmp_opt.saw_tstamp; | 995 | tmp_opt.tstamp_ok = tmp_opt.saw_tstamp; |
995 | tcp_openreq_init(req, &tmp_opt, skb); | 996 | tcp_openreq_init(req, &tmp_opt, skb); |
996 | 997 | ||
997 | treq = inet6_rsk(req); | 998 | ireq = inet_rsk(req); |
998 | treq->rmt_addr = ipv6_hdr(skb)->saddr; | 999 | ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr; |
999 | treq->loc_addr = ipv6_hdr(skb)->daddr; | 1000 | ireq->ir_v6_loc_addr = ipv6_hdr(skb)->daddr; |
1000 | if (!want_cookie || tmp_opt.tstamp_ok) | 1001 | if (!want_cookie || tmp_opt.tstamp_ok) |
1001 | TCP_ECN_create_request(req, skb, sock_net(sk)); | 1002 | TCP_ECN_create_request(req, skb, sock_net(sk)); |
1002 | 1003 | ||
1003 | treq->iif = sk->sk_bound_dev_if; | 1004 | ireq->ir_iif = sk->sk_bound_dev_if; |
1004 | 1005 | ||
1005 | /* So that link locals have meaning */ | 1006 | /* So that link locals have meaning */ |
1006 | if (!sk->sk_bound_dev_if && | 1007 | if (!sk->sk_bound_dev_if && |
1007 | ipv6_addr_type(&treq->rmt_addr) & IPV6_ADDR_LINKLOCAL) | 1008 | ipv6_addr_type(&ireq->ir_v6_rmt_addr) & IPV6_ADDR_LINKLOCAL) |
1008 | treq->iif = inet6_iif(skb); | 1009 | ireq->ir_iif = inet6_iif(skb); |
1009 | 1010 | ||
1010 | if (!isn) { | 1011 | if (!isn) { |
1011 | if (ipv6_opt_accepted(sk, skb) || | 1012 | if (ipv6_opt_accepted(sk, skb) || |
1012 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || | 1013 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || |
1013 | np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) { | 1014 | np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) { |
1014 | atomic_inc(&skb->users); | 1015 | atomic_inc(&skb->users); |
1015 | treq->pktopts = skb; | 1016 | ireq->pktopts = skb; |
1016 | } | 1017 | } |
1017 | 1018 | ||
1018 | if (want_cookie) { | 1019 | if (want_cookie) { |
@@ -1051,7 +1052,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1051 | * to the moment of synflood. | 1052 | * to the moment of synflood. |
1052 | */ | 1053 | */ |
1053 | LIMIT_NETDEBUG(KERN_DEBUG "TCP: drop open request from %pI6/%u\n", | 1054 | LIMIT_NETDEBUG(KERN_DEBUG "TCP: drop open request from %pI6/%u\n", |
1054 | &treq->rmt_addr, ntohs(tcp_hdr(skb)->source)); | 1055 | &ireq->ir_v6_rmt_addr, ntohs(tcp_hdr(skb)->source)); |
1055 | goto drop_and_release; | 1056 | goto drop_and_release; |
1056 | } | 1057 | } |
1057 | 1058 | ||
@@ -1086,7 +1087,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1086 | struct request_sock *req, | 1087 | struct request_sock *req, |
1087 | struct dst_entry *dst) | 1088 | struct dst_entry *dst) |
1088 | { | 1089 | { |
1089 | struct inet6_request_sock *treq; | 1090 | struct inet_request_sock *ireq; |
1090 | struct ipv6_pinfo *newnp, *np = inet6_sk(sk); | 1091 | struct ipv6_pinfo *newnp, *np = inet6_sk(sk); |
1091 | struct tcp6_sock *newtcp6sk; | 1092 | struct tcp6_sock *newtcp6sk; |
1092 | struct inet_sock *newinet; | 1093 | struct inet_sock *newinet; |
@@ -1151,7 +1152,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1151 | return newsk; | 1152 | return newsk; |
1152 | } | 1153 | } |
1153 | 1154 | ||
1154 | treq = inet6_rsk(req); | 1155 | ireq = inet_rsk(req); |
1155 | 1156 | ||
1156 | if (sk_acceptq_is_full(sk)) | 1157 | if (sk_acceptq_is_full(sk)) |
1157 | goto out_overflow; | 1158 | goto out_overflow; |
@@ -1185,10 +1186,10 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1185 | 1186 | ||
1186 | memcpy(newnp, np, sizeof(struct ipv6_pinfo)); | 1187 | memcpy(newnp, np, sizeof(struct ipv6_pinfo)); |
1187 | 1188 | ||
1188 | newsk->sk_v6_daddr = treq->rmt_addr; | 1189 | newsk->sk_v6_daddr = ireq->ir_v6_rmt_addr; |
1189 | newnp->saddr = treq->loc_addr; | 1190 | newnp->saddr = ireq->ir_v6_loc_addr; |
1190 | newsk->sk_v6_rcv_saddr = treq->loc_addr; | 1191 | newsk->sk_v6_rcv_saddr = ireq->ir_v6_loc_addr; |
1191 | newsk->sk_bound_dev_if = treq->iif; | 1192 | newsk->sk_bound_dev_if = ireq->ir_iif; |
1192 | 1193 | ||
1193 | /* Now IPv6 options... | 1194 | /* Now IPv6 options... |
1194 | 1195 | ||
@@ -1203,11 +1204,11 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1203 | 1204 | ||
1204 | /* Clone pktoptions received with SYN */ | 1205 | /* Clone pktoptions received with SYN */ |
1205 | newnp->pktoptions = NULL; | 1206 | newnp->pktoptions = NULL; |
1206 | if (treq->pktopts != NULL) { | 1207 | if (ireq->pktopts != NULL) { |
1207 | newnp->pktoptions = skb_clone(treq->pktopts, | 1208 | newnp->pktoptions = skb_clone(ireq->pktopts, |
1208 | sk_gfp_atomic(sk, GFP_ATOMIC)); | 1209 | sk_gfp_atomic(sk, GFP_ATOMIC)); |
1209 | consume_skb(treq->pktopts); | 1210 | consume_skb(ireq->pktopts); |
1210 | treq->pktopts = NULL; | 1211 | ireq->pktopts = NULL; |
1211 | if (newnp->pktoptions) | 1212 | if (newnp->pktoptions) |
1212 | skb_set_owner_r(newnp->pktoptions, newsk); | 1213 | skb_set_owner_r(newnp->pktoptions, newsk); |
1213 | } | 1214 | } |
@@ -1722,8 +1723,8 @@ static void get_openreq6(struct seq_file *seq, | |||
1722 | const struct sock *sk, struct request_sock *req, int i, kuid_t uid) | 1723 | const struct sock *sk, struct request_sock *req, int i, kuid_t uid) |
1723 | { | 1724 | { |
1724 | int ttd = req->expires - jiffies; | 1725 | int ttd = req->expires - jiffies; |
1725 | const struct in6_addr *src = &inet6_rsk(req)->loc_addr; | 1726 | const struct in6_addr *src = &inet_rsk(req)->ir_v6_loc_addr; |
1726 | const struct in6_addr *dest = &inet6_rsk(req)->rmt_addr; | 1727 | const struct in6_addr *dest = &inet_rsk(req)->ir_v6_rmt_addr; |
1727 | 1728 | ||
1728 | if (ttd < 0) | 1729 | if (ttd < 0) |
1729 | ttd = 0; | 1730 | ttd = 0; |
@@ -1734,10 +1735,10 @@ static void get_openreq6(struct seq_file *seq, | |||
1734 | i, | 1735 | i, |
1735 | src->s6_addr32[0], src->s6_addr32[1], | 1736 | src->s6_addr32[0], src->s6_addr32[1], |
1736 | src->s6_addr32[2], src->s6_addr32[3], | 1737 | src->s6_addr32[2], src->s6_addr32[3], |
1737 | ntohs(inet_rsk(req)->loc_port), | 1738 | ntohs(inet_rsk(req)->ir_loc_port), |
1738 | dest->s6_addr32[0], dest->s6_addr32[1], | 1739 | dest->s6_addr32[0], dest->s6_addr32[1], |
1739 | dest->s6_addr32[2], dest->s6_addr32[3], | 1740 | dest->s6_addr32[2], dest->s6_addr32[3], |
1740 | ntohs(inet_rsk(req)->rmt_port), | 1741 | ntohs(inet_rsk(req)->ir_rmt_port), |
1741 | TCP_SYN_RECV, | 1742 | TCP_SYN_RECV, |
1742 | 0,0, /* could print option size, but that is af dependent. */ | 1743 | 0,0, /* could print option size, but that is af dependent. */ |
1743 | 1, /* timers active (only the expire timer) */ | 1744 | 1, /* timers active (only the expire timer) */ |