]> git.baikalelectronics.ru Git - kernel.git/commit
net: ip6_gre: initialize erspan_ver just for erspan tunnels
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Fri, 15 Feb 2019 14:10:32 +0000 (15:10 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Feb 2019 04:14:25 +0000 (20:14 -0800)
commit1c0b13e480774aebd128c8cc7538cc8eb4ed6778
treefc86fe3707eaedbd1dfb5337605d5dab03c63b12
parent588dd5a8ac90eeccc702135c0157b8c6ec37df0d
net: ip6_gre: initialize erspan_ver just for erspan tunnels

After commit fec458dd8766 ("net: ip6_gre: always reports o_key to
userspace"), ip6gre and ip6gretap tunnels started reporting TUNNEL_KEY
output flag even if it is not configured.
ip6gre_fill_info checks erspan_ver value to add TUNNEL_KEY for
erspan tunnels, however in commit 36bf5b8df0fee ("erspan: set
erspan_ver to 1 by default when adding an erspan dev")
erspan_ver is initialized to 1 even for ip6gre or ip6gretap
Fix the issue moving erspan_ver initialization in a dedicated routine

Fixes: fec458dd8766 ("net: ip6_gre: always reports o_key to userspace")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_gre.c