From: Jesse Gross Date: Thu, 2 Dec 2010 21:07:36 +0000 (-0800) Subject: tunneling: Clear IP control block in one memset. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1195d37f19f11987027b5b15afa21be9e2a650a;p=openvswitch tunneling: Clear IP control block in one memset. We currently clear both the members of the IPCB individually before entering the IP stack. It's simpler and more robust to just clear the entire structure. Suggested-by: Ben Pfaff Signed-off-by: Jesse Gross --- diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 4a60fa78..f0ae98d0 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -1099,9 +1099,7 @@ static int send_frags(struct sk_buff *skb, int frag_len = skb->len - mutable->tunnel_hlen; skb->next = NULL; - - memset(&IPCB(skb)->opt, 0, sizeof(IPCB(skb)->opt)); - IPCB(skb)->flags = 0; + memset(IPCB(skb), 0, sizeof(*IPCB(skb))); err = ip_local_out(skb); if (likely(net_xmit_eval(err) == 0))