]> git.baikalelectronics.ru Git - kernel.git/commit
gre: fix a regression in ioctl
authorCong Wang <amwang@redhat.com>
Sat, 29 Jun 2013 04:02:59 +0000 (12:02 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jul 2013 06:35:22 +0000 (23:35 -0700)
commit82b6b7ff1ce41c83f0231e4ee1a3ba64fc0856b3
treea02a7d062d0f6bab77452123665c8f2d1ac3c674
parent81acddd799b7e1ca300c08a20de6d1ce8fd2a6bb
gre: fix a regression in ioctl

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 e7ccb3806ba4bf49634a4
("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

Cc: Pravin B Shelar <pshelar@nicira.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c