From: Ben Pfaff Date: Tue, 8 Jul 2008 20:46:14 +0000 (-0700) Subject: Set skb->dev before calling netif_rx(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21185e5db1ce2c5683658dacfcc6ca0b46207a93;p=openvswitch Set skb->dev before calling netif_rx(). Fixes null pointer dereference reported by David Erickson . --- diff --git a/datapath/dp_dev.c b/datapath/dp_dev.c index 48981376..e618d718 100644 --- a/datapath/dp_dev.c +++ b/datapath/dp_dev.c @@ -27,6 +27,7 @@ int dp_dev_recv(struct net_device *netdev, struct sk_buff *skb) { int len = skb->len; struct dp_dev *dp_dev = dp_dev_priv(netdev); + skb->dev = netdev; skb->pkt_type = PACKET_HOST; skb->protocol = eth_type_trans(skb, netdev); if (in_interrupt())