diff options
Diffstat (limited to 'net/ipv6/ip6_input.c')
-rw-r--r-- | net/ipv6/ip6_input.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 866f10726c58..6e3480426939 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -56,7 +56,7 @@ static inline int ip6_rcv_finish( struct sk_buff *skb) | |||
56 | return dst_input(skb); | 56 | return dst_input(skb); |
57 | } | 57 | } |
58 | 58 | ||
59 | int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 59 | int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
60 | { | 60 | { |
61 | struct ipv6hdr *hdr; | 61 | struct ipv6hdr *hdr; |
62 | u32 pkt_len; | 62 | u32 pkt_len; |
@@ -166,8 +166,8 @@ resubmit: | |||
166 | nexthdr = skb->nh.raw[nhoff]; | 166 | nexthdr = skb->nh.raw[nhoff]; |
167 | 167 | ||
168 | raw_sk = sk_head(&raw_v6_htable[nexthdr & (MAX_INET_PROTOS - 1)]); | 168 | raw_sk = sk_head(&raw_v6_htable[nexthdr & (MAX_INET_PROTOS - 1)]); |
169 | if (raw_sk) | 169 | if (raw_sk && !ipv6_raw_deliver(skb, nexthdr)) |
170 | ipv6_raw_deliver(skb, nexthdr); | 170 | raw_sk = NULL; |
171 | 171 | ||
172 | hash = nexthdr & (MAX_INET_PROTOS - 1); | 172 | hash = nexthdr & (MAX_INET_PROTOS - 1); |
173 | if ((ipprot = rcu_dereference(inet6_protos[hash])) != NULL) { | 173 | if ((ipprot = rcu_dereference(inet6_protos[hash])) != NULL) { |
@@ -198,12 +198,13 @@ resubmit: | |||
198 | if (!raw_sk) { | 198 | if (!raw_sk) { |
199 | if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { | 199 | if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { |
200 | IP6_INC_STATS_BH(IPSTATS_MIB_INUNKNOWNPROTOS); | 200 | IP6_INC_STATS_BH(IPSTATS_MIB_INUNKNOWNPROTOS); |
201 | icmpv6_param_prob(skb, ICMPV6_UNK_NEXTHDR, nhoff); | 201 | icmpv6_send(skb, ICMPV6_PARAMPROB, |
202 | ICMPV6_UNK_NEXTHDR, nhoff, | ||
203 | skb->dev); | ||
202 | } | 204 | } |
203 | } else { | 205 | } else |
204 | IP6_INC_STATS_BH(IPSTATS_MIB_INDELIVERS); | 206 | IP6_INC_STATS_BH(IPSTATS_MIB_INDELIVERS); |
205 | kfree_skb(skb); | 207 | kfree_skb(skb); |
206 | } | ||
207 | } | 208 | } |
208 | rcu_read_unlock(); | 209 | rcu_read_unlock(); |
209 | return 0; | 210 | return 0; |