• Lorenzo Bianconi's avatar
    net: ip6_gre: do not report erspan_ver for ip6gre or ip6gretap · b277a8a2
    Lorenzo Bianconi authored
    [ Upstream commit 103d0244 ]
    
    Report erspan version field to userspace in ip6gre_fill_info just for
    erspan_v6 tunnels. Moreover report IFLA_GRE_ERSPAN_INDEX only for
    erspan version 1.
    The issue can be triggered with the following reproducer:
    
    $ip link add name gre6 type ip6gre local 2001::1 remote 2002::2
    $ip link set gre6 up
    $ip -d link sh gre6
    14: grep6@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1448 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
        link/gre6 2001::1 peer 2002::2 promiscuity 0 minmtu 0 maxmtu 0
        ip6gre remote 2002::2 local 2001::1 hoplimit 64 encaplimit 4 tclass 0x00 flowlabel 0x00000 erspan_index 0 erspan_ver 0 addrgenmode eui64
    
    Fixes: 94d7d8f2 ("ip6_gre: add erspan v2 support")
    Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    b277a8a2
ip6_gre.c 58.4 KB