vxlan: release rt when found circular route
authorFan Du <fan.du@windriver.com>
Mon, 9 Dec 2013 02:33:53 +0000 (10:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Dec 2013 03:01:54 +0000 (22:01 -0500)
Otherwise causing dst memory leakage.
Have Checked all other type tunnel device transmit implementation,
no such things happens anymore.

Signed-off-by: Fan Du <fan.du@windriver.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c

index 0358c07f7669142034e089660425a8fdb88236e2..249e01c5600c9010a19ca07c175867ec9e5fb91d 100644 (file)
@@ -1668,7 +1668,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
                        netdev_dbg(dev, "circular route to %pI4\n",
                                   &dst->sin.sin_addr.s_addr);
                        dev->stats.collisions++;
-                       goto tx_error;
+                       goto rt_tx_error;
                }
 
                /* Bypass encapsulation if the destination is local */