bridge: tunnel: fix attribute checks in br_parse_vlan_tunnel_info
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Tue, 7 Feb 2017 11:46:46 +0000 (12:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Feb 2017 19:05:30 +0000 (14:05 -0500)
commitbb580ad698aeb4e5455d701c228c50355f84c056
treeb12d3d016cb536db67ab242539b7c9c5b10d9a92
parent1f02b5f42f53af516c4f5f747390e66d7a8f0bfe
bridge: tunnel: fix attribute checks in br_parse_vlan_tunnel_info

These checks should go after the attributes have been parsed otherwise
we're using tb uninitialized.

Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink_tunnel.c