diff options
Diffstat (limited to 'net/ipv6/ip6_input.c')
-rw-r--r-- | net/ipv6/ip6_input.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 79610b4bad3e..178aebc0427a 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -153,9 +153,8 @@ out: | |||
153 | static int ip6_input_finish(struct sk_buff *skb) | 153 | static int ip6_input_finish(struct sk_buff *skb) |
154 | { | 154 | { |
155 | struct inet6_protocol *ipprot; | 155 | struct inet6_protocol *ipprot; |
156 | struct sock *raw_sk; | ||
157 | unsigned int nhoff; | 156 | unsigned int nhoff; |
158 | int nexthdr; | 157 | int nexthdr, raw; |
159 | u8 hash; | 158 | u8 hash; |
160 | struct inet6_dev *idev; | 159 | struct inet6_dev *idev; |
161 | 160 | ||
@@ -171,9 +170,7 @@ resubmit: | |||
171 | nhoff = IP6CB(skb)->nhoff; | 170 | nhoff = IP6CB(skb)->nhoff; |
172 | nexthdr = skb_network_header(skb)[nhoff]; | 171 | nexthdr = skb_network_header(skb)[nhoff]; |
173 | 172 | ||
174 | raw_sk = sk_head(&raw_v6_htable[nexthdr & (MAX_INET_PROTOS - 1)]); | 173 | raw = raw6_local_deliver(skb, nexthdr); |
175 | if (raw_sk && !ipv6_raw_deliver(skb, nexthdr)) | ||
176 | raw_sk = NULL; | ||
177 | 174 | ||
178 | hash = nexthdr & (MAX_INET_PROTOS - 1); | 175 | hash = nexthdr & (MAX_INET_PROTOS - 1); |
179 | if ((ipprot = rcu_dereference(inet6_protos[hash])) != NULL) { | 176 | if ((ipprot = rcu_dereference(inet6_protos[hash])) != NULL) { |
@@ -206,7 +203,7 @@ resubmit: | |||
206 | else if (ret == 0) | 203 | else if (ret == 0) |
207 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INDELIVERS); | 204 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INDELIVERS); |
208 | } else { | 205 | } else { |
209 | if (!raw_sk) { | 206 | if (!raw) { |
210 | if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { | 207 | if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { |
211 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INUNKNOWNPROTOS); | 208 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INUNKNOWNPROTOS); |
212 | icmpv6_send(skb, ICMPV6_PARAMPROB, | 209 | icmpv6_send(skb, ICMPV6_PARAMPROB, |