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 21a15dfe4a9e..5ab923e51af3 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -168,13 +168,12 @@ drop: | |||
168 | 168 | ||
169 | static int ip6_input_finish(struct sk_buff *skb) | 169 | static int ip6_input_finish(struct sk_buff *skb) |
170 | { | 170 | { |
171 | struct net *net = dev_net(skb_dst(skb)->dev); | ||
171 | const struct inet6_protocol *ipprot; | 172 | const struct inet6_protocol *ipprot; |
173 | struct inet6_dev *idev; | ||
172 | unsigned int nhoff; | 174 | unsigned int nhoff; |
173 | int nexthdr; | 175 | int nexthdr; |
174 | bool raw; | 176 | bool raw; |
175 | u8 hash; | ||
176 | struct inet6_dev *idev; | ||
177 | struct net *net = dev_net(skb_dst(skb)->dev); | ||
178 | 177 | ||
179 | /* | 178 | /* |
180 | * Parse extension headers | 179 | * Parse extension headers |
@@ -189,9 +188,7 @@ resubmit: | |||
189 | nexthdr = skb_network_header(skb)[nhoff]; | 188 | nexthdr = skb_network_header(skb)[nhoff]; |
190 | 189 | ||
191 | raw = raw6_local_deliver(skb, nexthdr); | 190 | raw = raw6_local_deliver(skb, nexthdr); |
192 | 191 | if ((ipprot = rcu_dereference(inet6_protos[nexthdr])) != NULL) { | |
193 | hash = nexthdr & (MAX_INET_PROTOS - 1); | ||
194 | if ((ipprot = rcu_dereference(inet6_protos[hash])) != NULL) { | ||
195 | int ret; | 192 | int ret; |
196 | 193 | ||
197 | if (ipprot->flags & INET6_PROTO_FINAL) { | 194 | if (ipprot->flags & INET6_PROTO_FINAL) { |