From: Ben Pfaff Date: Wed, 12 Nov 2008 00:51:56 +0000 (-0800) Subject: Reset mac header in flow_extract(), because it might initially be null. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4181aef8770a85bdf2fd4080f1b06387447c8aa;p=openvswitch Reset mac header in flow_extract(), because it might initially be null. __alloc_skb() sets the mac header to null, and not all call chains reset it. --- diff --git a/datapath/flow.c b/datapath/flow.c index 48c2d4c9..10060b05 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -343,6 +343,7 @@ int flow_extract(struct sk_buff *skb, uint16_t in_port, return 0; } + skb_reset_mac_header(skb); eth = eth_hdr(skb); esh = (struct eth_snap_hdr *) eth; nh_ofs = sizeof *eth;