From: Stephen Hemminger Date: Fri, 14 Jul 2006 21:49:32 +0000 (-0700) Subject: [IPV4]: Clear skb cb on IP input X-Git-Tag: v2.6.18-rc2~8^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53602f92dd3691616478a40738353694bcfef171;p=platform%2Fkernel%2Flinux-3.10.git [IPV4]: Clear skb cb on IP input 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 Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index e1a7dba..184c78c 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c @@ -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);