[IPV4/6]: Check if packet was actually delivered to a raw socket to decide whether...
[safe/jmp/linux-2.6] / net / ipv4 / ip_input.c
index d603247..81e1802 100644 (file)
@@ -225,8 +225,8 @@ static inline int ip_local_deliver_finish(struct sk_buff *skb)
                /* If there maybe a raw socket we must check - if not we
                 * don't care less
                 */
-               if (raw_sk)
-                       raw_v4_input(skb, skb->nh.iph, hash);
+               if (raw_sk && !raw_v4_input(skb, skb->nh.iph, hash))
+                       raw_sk = NULL;
 
                if ((ipprot = rcu_dereference(inet_protos[hash])) != NULL) {
                        int ret;