aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r--net/ipv6/icmp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 5247d5c211f9..c7da1422cbde 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -600,9 +600,8 @@ static void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info)
600{ 600{
601 const struct inet6_protocol *ipprot; 601 const struct inet6_protocol *ipprot;
602 int inner_offset; 602 int inner_offset;
603 int hash;
604 u8 nexthdr;
605 __be16 frag_off; 603 __be16 frag_off;
604 u8 nexthdr;
606 605
607 if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) 606 if (!pskb_may_pull(skb, sizeof(struct ipv6hdr)))
608 return; 607 return;
@@ -629,10 +628,8 @@ static void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info)
629 --ANK (980726) 628 --ANK (980726)
630 */ 629 */
631 630
632 hash = nexthdr & (MAX_INET_PROTOS - 1);
633
634 rcu_read_lock(); 631 rcu_read_lock();
635 ipprot = rcu_dereference(inet6_protos[hash]); 632 ipprot = rcu_dereference(inet6_protos[nexthdr]);
636 if (ipprot && ipprot->err_handler) 633 if (ipprot && ipprot->err_handler)
637 ipprot->err_handler(skb, NULL, type, code, inner_offset, info); 634 ipprot->err_handler(skb, NULL, type, code, inner_offset, info);
638 rcu_read_unlock(); 635 rcu_read_unlock();