From: Jesse Gross Date: Fri, 21 Jun 2013 22:28:20 +0000 (-0700) Subject: datapath: Fix uninitializaed variable with GRE GSO. X-Git-Tag: sliver-openvswitch-1.10.90-3~6^2~70 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6d3e8965a2f1a4ff31db6f559d1e07f6b70e54b8;p=sliver-openvswitch.git 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 --- 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) {