netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net-next] gre: fix a regression in ioctl
@ 2013-06-29  2:04 Cong Wang
  2013-06-29  2:16 ` Cong Wang
  2013-06-29  2:24 ` [Patch net-next v2] " Cong Wang
  0 siblings, 2 replies; 12+ messages in thread
From: Cong Wang @ 2013-06-29  2:04 UTC (permalink / raw)
  To: netdev; +Cc: Pravin B Shelar, David S. Miller, Cong Wang

From: Cong Wang <amwang@redhat.com>

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 c54419321455631079c7d
("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 move it back inside 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>

---
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index c326e86..354d78c 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -314,11 +314,6 @@ static int ipgre_tunnel_ioctl(struct net_device *dev,
 
 	if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
 		return -EFAULT;
-	if (p.iph.version != 4 || p.iph.protocol != IPPROTO_GRE ||
-	    p.iph.ihl != 5 || (p.iph.frag_off&htons(~IP_DF)) ||
-	    ((p.i_flags|p.o_flags)&(GRE_VERSION|GRE_ROUTING))) {
-		return -EINVAL;
-	}
 	p.i_flags = gre_flags_to_tnl_flags(p.i_flags);
 	p.o_flags = gre_flags_to_tnl_flags(p.o_flags);
 
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 394cebc..eb9dd96 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -712,6 +712,11 @@ int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd)
 
 	case SIOCADDTUNNEL:
 	case SIOCCHGTUNNEL:
+		if (p->iph.version != 4 || p->iph.protocol != IPPROTO_GRE ||
+		    p->iph.ihl != 5 || (p->iph.frag_off&htons(~IP_DF)) ||
+		    ((p->i_flags|p->o_flags)&(GRE_VERSION|GRE_ROUTING)))
+			return -EINVAL;
+
 		err = -EPERM;
 		if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
 			goto done;

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [Patch net-next] gre: fix a regression in ioctl
  2013-06-29  2:04 [Patch net-next] gre: fix a regression in ioctl Cong Wang
@ 2013-06-29  2:16 ` Cong Wang
  2013-06-29  2:24 ` [Patch net-next v2] " Cong Wang
  1 sibling, 0 replies; 12+ messages in thread
From: Cong Wang @ 2013-06-29  2:16 UTC (permalink / raw)
  To: netdev; +Cc: Pravin B Shelar, David S. Miller

On Sat, 2013-06-29 at 10:04 +0800, Cong Wang wrote:
> From: Cong Wang <amwang@redhat.com>
> 
> 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 c54419321455631079c7d
> ("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 move it back inside 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>
> 
> ---
> diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
> index c326e86..354d78c 100644
> --- a/net/ipv4/ip_gre.c
> +++ b/net/ipv4/ip_gre.c
> @@ -314,11 +314,6 @@ static int ipgre_tunnel_ioctl(struct net_device *dev,
>  
>  	if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
>  		return -EFAULT;
> -	if (p.iph.version != 4 || p.iph.protocol != IPPROTO_GRE ||
> -	    p.iph.ihl != 5 || (p.iph.frag_off&htons(~IP_DF)) ||
> -	    ((p.i_flags|p.o_flags)&(GRE_VERSION|GRE_ROUTING))) {
> -		return -EINVAL;
> -	}
>  	p.i_flags = gre_flags_to_tnl_flags(p.i_flags);
>  	p.o_flags = gre_flags_to_tnl_flags(p.o_flags);

Self-NAK. p.i_flags is converted to tunnel flags, therefore should
probably check TUNNEL_* instead of GRE_*.

I will send v2.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Patch net-next v2] gre: fix a regression in ioctl
  2013-06-29  2:04 [Patch net-next] gre: fix a regression in ioctl Cong Wang
  2013-06-29  2:16 ` Cong Wang
@ 2013-06-29  2:24 ` Cong Wang
  2013-06-29  3:28   ` Pravin Shelar
  2013-06-29 15:52   ` [Patch net-next v2] " Sergei Shtylyov
  1 sibling, 2 replies; 12+ messages in thread
From: Cong Wang @ 2013-06-29  2:24 UTC (permalink / raw)
  To: netdev; +Cc: Pravin B Shelar, David S. Miller, Cong Wang

From: Cong Wang <amwang@redhat.com>

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 c54419321455631079c7d
("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 move it back inside 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>
---
v2: check TUNNEL_* flags

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index c326e86..354d78c 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -314,11 +314,6 @@ static int ipgre_tunnel_ioctl(struct net_device *dev,
 
 	if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
 		return -EFAULT;
-	if (p.iph.version != 4 || p.iph.protocol != IPPROTO_GRE ||
-	    p.iph.ihl != 5 || (p.iph.frag_off&htons(~IP_DF)) ||
-	    ((p.i_flags|p.o_flags)&(GRE_VERSION|GRE_ROUTING))) {
-		return -EINVAL;
-	}
 	p.i_flags = gre_flags_to_tnl_flags(p.i_flags);
 	p.o_flags = gre_flags_to_tnl_flags(p.o_flags);
 
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 394cebc..dc7d7ac 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -712,6 +712,11 @@ int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd)
 
 	case SIOCADDTUNNEL:
 	case SIOCCHGTUNNEL:
+		if (p->iph.version != 4 || p->iph.protocol != IPPROTO_GRE ||
+		    p->iph.ihl != 5 || (p->iph.frag_off&htons(~IP_DF)) ||
+		    ((p->i_flags|p->o_flags)&(TUNNEL_VERSION|TUNNEL_ROUTING)))
+			return -EINVAL;
+
 		err = -EPERM;
 		if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
 			goto done;

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [Patch net-next v2] gre: fix a regression in ioctl
  2013-06-29  2:24 ` [Patch net-next v2] " Cong Wang
@ 2013-06-29  3:28   ` Pravin Shelar
  2013-06-29  3:33     ` Cong Wang
  2013-06-29  4:02     ` [Patch net-next v3] " Cong Wang
  2013-06-29 15:52   ` [Patch net-next v2] " Sergei Shtylyov
  1 sibling, 2 replies; 12+ messages in thread
From: Pravin Shelar @ 2013-06-29  3:28 UTC (permalink / raw)
  To: Cong Wang; +Cc: netdev, David S. Miller

On Fri, Jun 28, 2013 at 7:24 PM, Cong Wang <amwang@redhat.com> wrote:
> From: Cong Wang <amwang@redhat.com>
>
> 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 c54419321455631079c7d
> ("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.
>

right, that API got changed. But these checks can not be added to
generic ip_tunnel layer, which is also used by other tunnel modules.
Can you keep that check in ip_gre module but do it only for add and
del tunnel commands?

> So, just move it back inside 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>
> ---
> v2: check TUNNEL_* flags
>
> diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
> index c326e86..354d78c 100644
> --- a/net/ipv4/ip_gre.c
> +++ b/net/ipv4/ip_gre.c
> @@ -314,11 +314,6 @@ static int ipgre_tunnel_ioctl(struct net_device *dev,
>
>         if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
>                 return -EFAULT;
> -       if (p.iph.version != 4 || p.iph.protocol != IPPROTO_GRE ||
> -           p.iph.ihl != 5 || (p.iph.frag_off&htons(~IP_DF)) ||
> -           ((p.i_flags|p.o_flags)&(GRE_VERSION|GRE_ROUTING))) {
> -               return -EINVAL;
> -       }
>         p.i_flags = gre_flags_to_tnl_flags(p.i_flags);
>         p.o_flags = gre_flags_to_tnl_flags(p.o_flags);
>
> diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
> index 394cebc..dc7d7ac 100644
> --- a/net/ipv4/ip_tunnel.c
> +++ b/net/ipv4/ip_tunnel.c
> @@ -712,6 +712,11 @@ int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd)
>
>         case SIOCADDTUNNEL:
>         case SIOCCHGTUNNEL:
> +               if (p->iph.version != 4 || p->iph.protocol != IPPROTO_GRE ||
> +                   p->iph.ihl != 5 || (p->iph.frag_off&htons(~IP_DF)) ||
> +                   ((p->i_flags|p->o_flags)&(TUNNEL_VERSION|TUNNEL_ROUTING)))
> +                       return -EINVAL;
> +
>                 err = -EPERM;
>                 if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
>                         goto done;

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Patch net-next v2] gre: fix a regression in ioctl
  2013-06-29  3:28   ` Pravin Shelar
@ 2013-06-29  3:33     ` Cong Wang
  2013-06-29  3:55       ` Cong Wang
  2013-06-29  4:02     ` [Patch net-next v3] " Cong Wang
  1 sibling, 1 reply; 12+ messages in thread
From: Cong Wang @ 2013-06-29  3:33 UTC (permalink / raw)
  To: Pravin Shelar; +Cc: netdev, David S. Miller

On Fri, 2013-06-28 at 20:28 -0700, Pravin Shelar wrote:
> On Fri, Jun 28, 2013 at 7:24 PM, Cong Wang <amwang@redhat.com> wrote:
> > From: Cong Wang <amwang@redhat.com>
> >
> > 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 c54419321455631079c7d
> > ("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.
> >
> 
> right, that API got changed. But these checks can not be added to
> generic ip_tunnel layer, which is also used by other tunnel modules.
> Can you keep that check in ip_gre module but do it only for add and
> del tunnel commands?

Yeah.

BTW, ipip has the same bug... I will send a patch for ipip too.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Patch net-next v2] gre: fix a regression in ioctl
  2013-06-29  3:33     ` Cong Wang
@ 2013-06-29  3:55       ` Cong Wang
  0 siblings, 0 replies; 12+ messages in thread
From: Cong Wang @ 2013-06-29  3:55 UTC (permalink / raw)
  To: Pravin Shelar; +Cc: netdev, David S. Miller

On Sat, 2013-06-29 at 11:33 +0800, Cong Wang wrote:
> BTW, ipip has the same bug... I will send a patch for ipip too.

Pravin,

Any reason to add the following check for ipip?

       if (p.i_key || p.o_key || p.i_flags || p.o_flags)
               return -EINVAL;

It seems the old code doesn't have this check, you added it in commit
fd58156e456d9f68fe04486be378d0bc93641532 (IPIP: Use ip-tunneling code.).

This breaks the API?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Patch net-next v3] gre: fix a regression in ioctl
  2013-06-29  3:28   ` Pravin Shelar
  2013-06-29  3:33     ` Cong Wang
@ 2013-06-29  4:02     ` Cong Wang
  2013-06-29 18:42       ` Dmitry Kravkov
  2013-07-02  6:36       ` David Miller
  1 sibling, 2 replies; 12+ messages in thread
From: Cong Wang @ 2013-06-29  4:02 UTC (permalink / raw)
  To: netdev; +Cc: Pravin B Shelar, David S. Miller, Cong Wang

From: Cong Wang <amwang@redhat.com>

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 c54419321455631079c7d
("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>
---
v2: check TUNNEL_* flags
v3: the check should be kept in gre module

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index c326e86..1f6eab6 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -314,10 +314,11 @@ static int ipgre_tunnel_ioctl(struct net_device *dev,
 
 	if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
 		return -EFAULT;
-	if (p.iph.version != 4 || p.iph.protocol != IPPROTO_GRE ||
-	    p.iph.ihl != 5 || (p.iph.frag_off&htons(~IP_DF)) ||
-	    ((p.i_flags|p.o_flags)&(GRE_VERSION|GRE_ROUTING))) {
-		return -EINVAL;
+	if (cmd == SIOCADDTUNNEL || cmd == SIOCCHGTUNNEL) {
+		if (p.iph.version != 4 || p.iph.protocol != IPPROTO_GRE ||
+		    p.iph.ihl != 5 || (p.iph.frag_off&htons(~IP_DF)) ||
+		    ((p.i_flags|p.o_flags)&(GRE_VERSION|GRE_ROUTING)))
+			return -EINVAL;
 	}
 	p.i_flags = gre_flags_to_tnl_flags(p.i_flags);
 	p.o_flags = gre_flags_to_tnl_flags(p.o_flags);

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [Patch net-next v2] gre: fix a regression in ioctl
  2013-06-29  2:24 ` [Patch net-next v2] " Cong Wang
  2013-06-29  3:28   ` Pravin Shelar
@ 2013-06-29 15:52   ` Sergei Shtylyov
  2013-07-01  2:08     ` Cong Wang
  1 sibling, 1 reply; 12+ messages in thread
From: Sergei Shtylyov @ 2013-06-29 15:52 UTC (permalink / raw)
  To: Cong Wang; +Cc: netdev, Pravin B Shelar, David S. Miller

Hello.

On 29-06-2013 6:24, Cong Wang wrote:

> From: Cong Wang <amwang@redhat.com>

> 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 c54419321455631079c7d
> ("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 move it back inside 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>
> ---
> v2: check TUNNEL_* flags

[...]
> diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
> index 394cebc..dc7d7ac 100644
> --- a/net/ipv4/ip_tunnel.c
> +++ b/net/ipv4/ip_tunnel.c
> @@ -712,6 +712,11 @@ int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd)
>
>   	case SIOCADDTUNNEL:
>   	case SIOCCHGTUNNEL:
> +		if (p->iph.version != 4 || p->iph.protocol != IPPROTO_GRE ||
> +		    p->iph.ihl != 5 || (p->iph.frag_off&htons(~IP_DF)) ||
> +		    ((p->i_flags|p->o_flags)&(TUNNEL_VERSION|TUNNEL_ROUTING)))

    Maybe it's time to insert spaces around & to make the code formatted 
consistently?

WBR, Sergei

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Patch net-next v3] gre: fix a regression in ioctl
  2013-06-29  4:02     ` [Patch net-next v3] " Cong Wang
@ 2013-06-29 18:42       ` Dmitry Kravkov
  2013-07-01  2:06         ` Cong Wang
  2013-07-02  6:36       ` David Miller
  1 sibling, 1 reply; 12+ messages in thread
From: Dmitry Kravkov @ 2013-06-29 18:42 UTC (permalink / raw)
  To: Cong Wang; +Cc: netdev@vger.kernel.org, Pravin B Shelar, David S. Miller

On Sat, Jun 29, 2013 at 7:02 AM, Cong Wang <amwang@redhat.com> wrote:
> From: Cong Wang <amwang@redhat.com>
>
> 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 c54419321455631079c7d
> ("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>
> ---
> v2: check TUNNEL_* flags
> v3: the check should be kept in gre module
>

Shouldn't this be addressed in net-tree?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Patch net-next v3] gre: fix a regression in ioctl
  2013-06-29 18:42       ` Dmitry Kravkov
@ 2013-07-01  2:06         ` Cong Wang
  0 siblings, 0 replies; 12+ messages in thread
From: Cong Wang @ 2013-07-01  2:06 UTC (permalink / raw)
  To: Dmitry Kravkov; +Cc: netdev@vger.kernel.org, Pravin B Shelar, David S. Miller

On Sat, 2013-06-29 at 21:42 +0300, Dmitry Kravkov wrote:
> 
> Shouldn't this be addressed in net-tree?

Oh, yeah, I thought only net-next contains that commit...

David, please apply this to net (I tried, the patch can be applied to
net).

Thanks!

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Patch net-next v2] gre: fix a regression in ioctl
  2013-06-29 15:52   ` [Patch net-next v2] " Sergei Shtylyov
@ 2013-07-01  2:08     ` Cong Wang
  0 siblings, 0 replies; 12+ messages in thread
From: Cong Wang @ 2013-07-01  2:08 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: netdev, Pravin B Shelar, David S. Miller

On Sat, 2013-06-29 at 19:52 +0400, Sergei Shtylyov wrote:
> 
>     Maybe it's time to insert spaces around & to make the code formatted 
> consistently?

Hi, Sergei

You are always welcome to send a _pure_ coding-style fix, not just for
these few lines. ;)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Patch net-next v3] gre: fix a regression in ioctl
  2013-06-29  4:02     ` [Patch net-next v3] " Cong Wang
  2013-06-29 18:42       ` Dmitry Kravkov
@ 2013-07-02  6:36       ` David Miller
  1 sibling, 0 replies; 12+ messages in thread
From: David Miller @ 2013-07-02  6:36 UTC (permalink / raw)
  To: amwang; +Cc: netdev, pshelar

From: Cong Wang <amwang@redhat.com>
Date: Sat, 29 Jun 2013 12:02:59 +0800

> From: Cong Wang <amwang@redhat.com>
> 
> 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 c54419321455631079c7d
> ("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>

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-07-02  6:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-29  2:04 [Patch net-next] gre: fix a regression in ioctl Cong Wang
2013-06-29  2:16 ` Cong Wang
2013-06-29  2:24 ` [Patch net-next v2] " Cong Wang
2013-06-29  3:28   ` Pravin Shelar
2013-06-29  3:33     ` Cong Wang
2013-06-29  3:55       ` Cong Wang
2013-06-29  4:02     ` [Patch net-next v3] " Cong Wang
2013-06-29 18:42       ` Dmitry Kravkov
2013-07-01  2:06         ` Cong Wang
2013-07-02  6:36       ` David Miller
2013-06-29 15:52   ` [Patch net-next v2] " Sergei Shtylyov
2013-07-01  2:08     ` Cong Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).