• Cong Wang's avatar
    gre: fix a regression in ioctl · 3d3fa8bc
    Cong Wang authored
    [ Upstream commit 6c734fb8 ]
    
    When testing GRE tunnel, I got:
    
     # ip tunnel show
     get tunnel gre0 failed: Invalid argument
     get tunnel gre1 failed: Invalid argument
    
    This is a regression introduced by commit c5441932
    ("GRE: Refactor GRE tunneling code.") because previously we
    only check the parameters for SIOCADDTUNNEL and SIOCCHGTUNNEL,
    after that commit, the check is moved for all commands.
    
    So, just check for SIOCADDTUNNEL and SIOCCHGTUNNEL.
    
    After this patch I got:
    
     # ip tunnel show
     gre0: gre/ip  remote any  local any  ttl inherit  nopmtudisc
     gre1: gre/ip  remote 192.168.122.101  local 192.168.122.45  ttl inherit
    Signed-off-by: default avatarCong Wang <amwang@redhat.com>
    Cc: Pravin B Shelar <pshelar@nicira.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    3d3fa8bc
ip_gre.c 25.9 KB