bridge: vlan_tunnel: explicitly reset metadata attrs to NULL on failure
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Thu, 16 Feb 2017 19:29:21 +0000 (11:29 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Feb 2017 18:33:41 +0000 (13:33 -0500)
Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support")
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_vlan_tunnel.c

index b2b79a0701626a4fd8dc7a2e91d52cbe54b04444..6d2c4eed2dc892b15a99f4741dc8639b25a63e32 100644 (file)
@@ -85,6 +85,8 @@ static int __vlan_tunnel_info_add(struct net_bridge_vlan_group *vg,
        return 0;
 out:
        dst_release(&vlan->tinfo.tunnel_dst->dst);
+       vlan->tinfo.tunnel_dst = NULL;
+       vlan->tinfo.tunnel_id = 0;
 
        return err;
 }