From 6d3e8965a2f1a4ff31db6f559d1e07f6b70e54b8 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Fri, 21 Jun 2013 15:28:20 -0700 Subject: [PATCH] datapath: Fix uninitializaed variable with GRE GSO. If a packet is neither GSO nor CHECKSUM_PARTIAL then the GRE GSO compatibility code can use an uninitialized IP ID. CC: Pravin Shelar Reported-by: Joe Stringer Signed-off-by: Jesse Gross --- datapath/linux/compat/gso.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datapath/linux/compat/gso.c b/datapath/linux/compat/gso.c index 7379a579c..3cadde95a 100644 --- a/datapath/linux/compat/gso.c +++ b/datapath/linux/compat/gso.c @@ -103,7 +103,7 @@ free: int rpl_ip_local_out(struct sk_buff *skb) { int ret = NETDEV_TX_OK; - int id; + int id = -1; if (skb_is_gso(skb)) { struct iphdr *iph; @@ -119,7 +119,6 @@ int rpl_ip_local_out(struct sk_buff *skb) err = skb_checksum_help(skb); if (unlikely(err)) return 0; - id = -1; } while (skb) { -- 2.20.1