diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-07-14 17:49:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-14 17:49:32 -0400 |
commit | 53602f92dd3691616478a40738353694bcfef171 (patch) | |
tree | 65ddb88b0d63d6a52222063cb31f7041859e827d /net | |
parent | 27b437c8b7d519aac70a0254c2e04c29eff565a2 (diff) |
[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 <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ip_input.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index e1a7dba2fa8a..184c78ca79e6 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, | |||
428 | goto drop; | 428 | goto drop; |
429 | } | 429 | } |
430 | 430 | ||
431 | /* Remove any debris in the socket control block */ | ||
432 | memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); | ||
433 | |||
431 | return NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, dev, NULL, | 434 | return NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, dev, NULL, |
432 | ip_rcv_finish); | 435 | ip_rcv_finish); |
433 | 436 | ||