]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[IPV4]: Clear skb cb on IP input
authorStephen Hemminger <shemminger@osdl.org>
Fri, 14 Jul 2006 21:49:32 +0000 (14:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Jul 2006 21:49:32 +0000 (14:49 -0700)
when data arrives at IP through loopback (and possibly other devices).
So the field needs to be cleared before it confuses the route code.
This was seen when running netem over loopback, but there are probably
other device cases. Maybe this should go into stable?

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_input.c

index e1a7dba2fa8ac6c381e3d0fb7c63d7ba99a857ea..184c78ca79e65e895800153e351ca4fbaa7e7e60 100644 (file)
@@ -428,6 +428,9 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
                goto drop;
        }
 
+       /* Remove any debris in the socket control block */
+       memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
+
        return NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, dev, NULL,
                       ip_rcv_finish);