Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53602f92 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

[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: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 27b437c8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);