diff options
-rw-r--r-- | include/net/ipv6.h | 3 | ||||
-rw-r--r-- | net/dccp/ipv6.c | 2 | ||||
-rw-r--r-- | net/ipv6/af_inet6.c | 4 | ||||
-rw-r--r-- | net/ipv6/syncookies.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 5 |
5 files changed, 9 insertions, 7 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 7e247e9b8765..97f472012438 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -288,7 +288,8 @@ struct ipv6_txoptions *ipv6_renew_options(struct sock *sk, | |||
288 | struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, | 288 | struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, |
289 | struct ipv6_txoptions *opt); | 289 | struct ipv6_txoptions *opt); |
290 | 290 | ||
291 | bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb); | 291 | bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb, |
292 | const struct inet6_skb_parm *opt); | ||
292 | 293 | ||
293 | static inline bool ipv6_accept_ra(struct inet6_dev *idev) | 294 | static inline bool ipv6_accept_ra(struct inet6_dev *idev) |
294 | { | 295 | { |
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 04cb17d4b0ce..ad2acfe1ca61 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -404,7 +404,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
404 | ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr; | 404 | ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr; |
405 | ireq->ir_v6_loc_addr = ipv6_hdr(skb)->daddr; | 405 | ireq->ir_v6_loc_addr = ipv6_hdr(skb)->daddr; |
406 | 406 | ||
407 | if (ipv6_opt_accepted(sk, skb) || | 407 | if (ipv6_opt_accepted(sk, skb, IP6CB(skb)) || |
408 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || | 408 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || |
409 | np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) { | 409 | np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) { |
410 | atomic_inc(&skb->users); | 410 | atomic_inc(&skb->users); |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index e4865a3ebe1d..34f726f59814 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -672,10 +672,10 @@ int inet6_sk_rebuild_header(struct sock *sk) | |||
672 | } | 672 | } |
673 | EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header); | 673 | EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header); |
674 | 674 | ||
675 | bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb) | 675 | bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb, |
676 | const struct inet6_skb_parm *opt) | ||
676 | { | 677 | { |
677 | const struct ipv6_pinfo *np = inet6_sk(sk); | 678 | const struct ipv6_pinfo *np = inet6_sk(sk); |
678 | const struct inet6_skb_parm *opt = IP6CB(skb); | ||
679 | 679 | ||
680 | if (np->rxopt.all) { | 680 | if (np->rxopt.all) { |
681 | if ((opt->hop && (np->rxopt.bits.hopopts || | 681 | if ((opt->hop && (np->rxopt.bits.hopopts || |
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c index c643dc907ce7..9a2838e93cc5 100644 --- a/net/ipv6/syncookies.c +++ b/net/ipv6/syncookies.c | |||
@@ -203,7 +203,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
203 | ireq->ir_num = ntohs(th->dest); | 203 | ireq->ir_num = ntohs(th->dest); |
204 | ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr; | 204 | ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr; |
205 | ireq->ir_v6_loc_addr = ipv6_hdr(skb)->daddr; | 205 | ireq->ir_v6_loc_addr = ipv6_hdr(skb)->daddr; |
206 | if (ipv6_opt_accepted(sk, skb) || | 206 | if (ipv6_opt_accepted(sk, skb, &TCP_SKB_CB(skb)->header.h6) || |
207 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || | 207 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || |
208 | np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) { | 208 | np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) { |
209 | atomic_inc(&skb->users); | 209 | atomic_inc(&skb->users); |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index de51a88bec6f..9400b4326f22 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -742,7 +742,8 @@ static void tcp_v6_init_req(struct request_sock *req, struct sock *sk, | |||
742 | ireq->ir_iif = inet6_iif(skb); | 742 | ireq->ir_iif = inet6_iif(skb); |
743 | 743 | ||
744 | if (!TCP_SKB_CB(skb)->tcp_tw_isn && | 744 | if (!TCP_SKB_CB(skb)->tcp_tw_isn && |
745 | (ipv6_opt_accepted(sk, skb) || np->rxopt.bits.rxinfo || | 745 | (ipv6_opt_accepted(sk, skb, &TCP_SKB_CB(skb)->header.h6) || |
746 | np->rxopt.bits.rxinfo || | ||
746 | np->rxopt.bits.rxoinfo || np->rxopt.bits.rxhlim || | 747 | np->rxopt.bits.rxoinfo || np->rxopt.bits.rxhlim || |
747 | np->rxopt.bits.rxohlim || np->repflow)) { | 748 | np->rxopt.bits.rxohlim || np->repflow)) { |
748 | atomic_inc(&skb->users); | 749 | atomic_inc(&skb->users); |
@@ -1367,7 +1368,7 @@ ipv6_pktoptions: | |||
1367 | np->rcv_flowinfo = ip6_flowinfo(ipv6_hdr(opt_skb)); | 1368 | np->rcv_flowinfo = ip6_flowinfo(ipv6_hdr(opt_skb)); |
1368 | if (np->repflow) | 1369 | if (np->repflow) |
1369 | np->flow_label = ip6_flowlabel(ipv6_hdr(opt_skb)); | 1370 | np->flow_label = ip6_flowlabel(ipv6_hdr(opt_skb)); |
1370 | if (ipv6_opt_accepted(sk, opt_skb)) { | 1371 | if (ipv6_opt_accepted(sk, opt_skb, &TCP_SKB_CB(opt_skb)->header.h6)) { |
1371 | skb_set_owner_r(opt_skb, sk); | 1372 | skb_set_owner_r(opt_skb, sk); |
1372 | opt_skb = xchg(&np->pktoptions, opt_skb); | 1373 | opt_skb = xchg(&np->pktoptions, opt_skb); |
1373 | } else { | 1374 | } else { |