From 0cf59c05593ecb078fb3a284ea39f473e0b13364 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Fri, 4 Mar 2011 12:56:25 -0800 Subject: [PATCH] tunneling: Don't leak dst on vlan tagging failure. When we need to send a packet through the IP stack we need to attach a dst to the skb. Due to some interactions with caching this doesn't happen until late in the transmission process. However, if we are inserting a vlan tag and the insertion fails it is possible to leak the dst. Reported-by: Ben Pfaff Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- datapath/tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 7e0c8ee8..98af3038 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -1314,9 +1314,9 @@ next: error_free: tnl_free_linked_skbs(skb); error: - dst_release(unattached_dst); vport_record_error(vport, err); out: + dst_release(unattached_dst); return sent_len; } -- 2.30.2