From b1195d37f19f11987027b5b15afa21be9e2a650a Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Thu, 2 Dec 2010 13:07:36 -0800 Subject: [PATCH] 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 --- datapath/tunnel.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 4a60fa786..f0ae98d05 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)) -- 2.45.2