[IPV4/6]: Check if packet was actually delivered to a raw socket to decide whether...
[deliverable/linux.git] / net / ipv4 / ip_input.c
index c703528e0bcd524751b8b4e43415e2b8e8ccadaf..81e18023dc19c299afa03108df2ddd1756e2e342 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;
@@ -358,7 +358,7 @@ drop:
 /*
  *     Main IP Receive routine.
  */ 
-int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
+int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)
 {
        struct iphdr *iph;
 
This page took 0.029203 seconds and 5 git commands to generate.