diff options
Diffstat (limited to 'net/ipv6')
| -rw-r--r-- | net/ipv6/netfilter/nf_conntrack_reasm.c | 8 | ||||
| -rw-r--r-- | net/ipv6/reassembly.c | 7 | ||||
| -rw-r--r-- | net/ipv6/sit.c | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index ed4d79a9e4a6..058a5e4a60c3 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
| @@ -528,14 +528,14 @@ find_prev_fhdr(struct sk_buff *skb, u8 *prevhdrp, int *prevhoff, int *fhoff) | |||
| 528 | if (!ipv6_ext_hdr(nexthdr)) { | 528 | if (!ipv6_ext_hdr(nexthdr)) { |
| 529 | return -1; | 529 | return -1; |
| 530 | } | 530 | } |
| 531 | if (len < (int)sizeof(struct ipv6_opt_hdr)) { | ||
| 532 | pr_debug("too short\n"); | ||
| 533 | return -1; | ||
| 534 | } | ||
| 535 | if (nexthdr == NEXTHDR_NONE) { | 531 | if (nexthdr == NEXTHDR_NONE) { |
| 536 | pr_debug("next header is none\n"); | 532 | pr_debug("next header is none\n"); |
| 537 | return -1; | 533 | return -1; |
| 538 | } | 534 | } |
| 535 | if (len < (int)sizeof(struct ipv6_opt_hdr)) { | ||
| 536 | pr_debug("too short\n"); | ||
| 537 | return -1; | ||
| 538 | } | ||
| 539 | if (skb_copy_bits(skb, start, &hdr, sizeof(hdr))) | 539 | if (skb_copy_bits(skb, start, &hdr, sizeof(hdr))) |
| 540 | BUG(); | 540 | BUG(); |
| 541 | if (nexthdr == NEXTHDR_AUTH) | 541 | if (nexthdr == NEXTHDR_AUTH) |
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 3c575118fca5..e9ac7a12f595 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
| @@ -452,6 +452,7 @@ err: | |||
| 452 | static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, | 452 | static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, |
| 453 | struct net_device *dev) | 453 | struct net_device *dev) |
| 454 | { | 454 | { |
| 455 | struct net *net = container_of(fq->q.net, struct net, ipv6.frags); | ||
| 455 | struct sk_buff *fp, *head = fq->q.fragments; | 456 | struct sk_buff *fp, *head = fq->q.fragments; |
| 456 | int payload_len; | 457 | int payload_len; |
| 457 | unsigned int nhoff; | 458 | unsigned int nhoff; |
| @@ -551,8 +552,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, | |||
| 551 | head->csum); | 552 | head->csum); |
| 552 | 553 | ||
| 553 | rcu_read_lock(); | 554 | rcu_read_lock(); |
| 554 | IP6_INC_STATS_BH(dev_net(dev), | 555 | IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMOKS); |
| 555 | __in6_dev_get(dev), IPSTATS_MIB_REASMOKS); | ||
| 556 | rcu_read_unlock(); | 556 | rcu_read_unlock(); |
| 557 | fq->q.fragments = NULL; | 557 | fq->q.fragments = NULL; |
| 558 | return 1; | 558 | return 1; |
| @@ -566,8 +566,7 @@ out_oom: | |||
| 566 | printk(KERN_DEBUG "ip6_frag_reasm: no memory for reassembly\n"); | 566 | printk(KERN_DEBUG "ip6_frag_reasm: no memory for reassembly\n"); |
| 567 | out_fail: | 567 | out_fail: |
| 568 | rcu_read_lock(); | 568 | rcu_read_lock(); |
| 569 | IP6_INC_STATS_BH(dev_net(dev), | 569 | IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS); |
| 570 | __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS); | ||
| 571 | rcu_read_unlock(); | 570 | rcu_read_unlock(); |
| 572 | return -1; | 571 | return -1; |
| 573 | } | 572 | } |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index d3467e563f02..5cee2bcbcece 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
| @@ -188,9 +188,9 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct net *net, | |||
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | nt = netdev_priv(dev); | 190 | nt = netdev_priv(dev); |
| 191 | ipip6_tunnel_init(dev); | ||
| 192 | 191 | ||
| 193 | nt->parms = *parms; | 192 | nt->parms = *parms; |
| 193 | ipip6_tunnel_init(dev); | ||
| 194 | 194 | ||
| 195 | if (parms->i_flags & SIT_ISATAP) | 195 | if (parms->i_flags & SIT_ISATAP) |
| 196 | dev->priv_flags |= IFF_ISATAP; | 196 | dev->priv_flags |= IFF_ISATAP; |
