[IPV6]: Check interface bindings on IPv6 raw socket reception
[deliverable/linux.git] / net / ipv4 / ip_input.c
index 4e47a2658c7cd3444f6bf10ec769f9fc726859fb..d603247bdfe974012db107d6e08c4ae1a2fcb067 100644 (file)
@@ -184,6 +184,7 @@ int ip_call_ra_chain(struct sk_buff *skb)
                                        raw_rcv(last, skb2);
                        }
                        last = sk;
+                       nf_reset(skb);
                }
        }
 
@@ -200,10 +201,6 @@ static inline int ip_local_deliver_finish(struct sk_buff *skb)
 {
        int ihl = skb->nh.iph->ihl*4;
 
-#ifdef CONFIG_NETFILTER_DEBUG
-       nf_debug_ip_local_deliver(skb);
-#endif /*CONFIG_NETFILTER_DEBUG*/
-
        __skb_pull(skb, ihl);
 
        /* Free reference early: we don't need it any more, and it may
@@ -286,14 +283,18 @@ static inline int ip_rcv_finish(struct sk_buff *skb)
 {
        struct net_device *dev = skb->dev;
        struct iphdr *iph = skb->nh.iph;
+       int err;
 
        /*
         *      Initialise the virtual path cache for the packet. It describes
         *      how the packet travels inside Linux networking.
         */ 
        if (skb->dst == NULL) {
-               if (ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev))
+               if ((err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev))) {
+                       if (err == -EHOSTUNREACH)
+                               IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS);
                        goto drop; 
+               }
        }
 
 #ifdef CONFIG_NET_CLS_ROUTE
@@ -357,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.028912 seconds and 5 git commands to generate.