]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv6/ip6_input.c
[IPV4/6]: Check if packet was actually delivered to a raw socket to decide whether...
[net-next-2.6.git] / net / ipv6 / ip6_input.c
index ab51c0369e157b34ce9bfa99e68f449ac775f200..6e3480426939150b7c997dc01c41d7a1805951d1 100644 (file)
@@ -166,8 +166,8 @@ resubmit:
        nexthdr = skb->nh.raw[nhoff];
 
        raw_sk = sk_head(&raw_v6_htable[nexthdr & (MAX_INET_PROTOS - 1)]);
-       if (raw_sk)
-               ipv6_raw_deliver(skb, nexthdr);
+       if (raw_sk && !ipv6_raw_deliver(skb, nexthdr))
+               raw_sk = NULL;
 
        hash = nexthdr & (MAX_INET_PROTOS - 1);
        if ((ipprot = rcu_dereference(inet6_protos[hash])) != NULL) {