All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type
@ 2019-04-01  0:04 Sheena Mira-ato
  2019-04-02 20:20 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Sheena Mira-ato @ 2019-04-01  0:04 UTC (permalink / raw)
  To: netdev, davem, kuznet, yoshfuji; +Cc: Sheena Mira-ato

The device type for ip6 tunnels is set to
ARPHRD_TUNNEL6. However, the ip4ip6_err function
is expecting the device type of the tunnel to be
ARPHRD_TUNNEL.  Since the device types do not
match, the function exits and the ICMP error
packet is not sent to the originating host. Note
that the device type for IPv4 tunnels is set to
ARPHRD_TUNNEL.

Fix is to expect a tunnel device type of
ARPHRD_TUNNEL6 instead.  Now the tunnel device
type matches and the ICMP error packet is sent
to the originating host.

Signed-off-by: Sheena Mira-ato <sheena.mira-ato@alliedtelesis.co.nz>
---
 net/ipv6/ip6_tunnel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 0c6403cf8b52..ade1390c6348 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -627,7 +627,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
 		rt = ip_route_output_ports(dev_net(skb->dev), &fl4, NULL,
 					   eiph->daddr, eiph->saddr, 0, 0,
 					   IPPROTO_IPIP, RT_TOS(eiph->tos), 0);
-		if (IS_ERR(rt) || rt->dst.dev->type != ARPHRD_TUNNEL) {
+		if (IS_ERR(rt) || rt->dst.dev->type != ARPHRD_TUNNEL6) {
 			if (!IS_ERR(rt))
 				ip_rt_put(rt);
 			goto out;
@@ -636,7 +636,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
 	} else {
 		if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos,
 				   skb2->dev) ||
-		    skb_dst(skb2)->dev->type != ARPHRD_TUNNEL)
+		    skb_dst(skb2)->dev->type != ARPHRD_TUNNEL6)
 			goto out;
 	}
 
-- 
2.21.0


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

* Re: [PATCH] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type
  2019-04-01  0:04 [PATCH] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type Sheena Mira-ato
@ 2019-04-02 20:20 ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2019-04-02 20:20 UTC (permalink / raw)
  To: sheena.mira-ato; +Cc: netdev, kuznet, yoshfuji

From: Sheena Mira-ato <sheena.mira-ato@alliedtelesis.co.nz>
Date: Mon,  1 Apr 2019 13:04:42 +1300

> The device type for ip6 tunnels is set to
> ARPHRD_TUNNEL6. However, the ip4ip6_err function
> is expecting the device type of the tunnel to be
> ARPHRD_TUNNEL.  Since the device types do not
> match, the function exits and the ICMP error
> packet is not sent to the originating host. Note
> that the device type for IPv4 tunnels is set to
> ARPHRD_TUNNEL.
> 
> Fix is to expect a tunnel device type of
> ARPHRD_TUNNEL6 instead.  Now the tunnel device
> type matches and the ICMP error packet is sent
> to the originating host.
> 
> Signed-off-by: Sheena Mira-ato <sheena.mira-ato@alliedtelesis.co.nz>

Applied and queued up for -stable.

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

* Re: [PATCH] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type
  2019-04-11 21:15 ` David Miller
@ 2019-04-11 22:29   ` Sheena Mira-ato
  0 siblings, 0 replies; 5+ messages in thread
From: Sheena Mira-ato @ 2019-04-11 22:29 UTC (permalink / raw)
  To: davem; +Cc: netdev, yoshfuji, kuznet

Sorry about this.

I resubmitted it, then a day later got the emails informing me
that the patch was added to the 4.19-stable and 5.0-stable trees.

Thanks
Sheena
On Thu, 2019-04-11 at 14:15 -0700, David Miller wrote:
> From: Sheena Mira-ato <sheena.mira-ato@alliedtelesis.co.nz>
> Date: Wed, 10 Apr 2019 08:36:35 +1200
> 
> > 
> > The device type for ip6 tunnels is set to
> > ARPHRD_TUNNEL6. However, the ip4ip6_err function
> > is expecting the device type of the tunnel to be
> > ARPHRD_TUNNEL.  Since the device types do not
> > match, the function exits and the ICMP error
> > packet is not sent to the originating host. Note
> > that the device type for IPv4 tunnels is set to
> > ARPHRD_TUNNEL.
> > 
> > Fix is to expect a tunnel device type of
> > ARPHRD_TUNNEL6 instead.  Now the tunnel device
> > type matches and the ICMP error packet is sent
> > to the originating host.
> > 
> > Signed-off-by: Sheena Mira-ato <sheena.mira-ato@alliedtelesis.co.nz>
> This change is already in my tree, why are you resubmitting it?

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

* Re: [PATCH] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type
  2019-04-09 20:36 Sheena Mira-ato
@ 2019-04-11 21:15 ` David Miller
  2019-04-11 22:29   ` Sheena Mira-ato
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2019-04-11 21:15 UTC (permalink / raw)
  To: sheena.mira-ato; +Cc: netdev, kuznet, yoshfuji

From: Sheena Mira-ato <sheena.mira-ato@alliedtelesis.co.nz>
Date: Wed, 10 Apr 2019 08:36:35 +1200

> The device type for ip6 tunnels is set to
> ARPHRD_TUNNEL6. However, the ip4ip6_err function
> is expecting the device type of the tunnel to be
> ARPHRD_TUNNEL.  Since the device types do not
> match, the function exits and the ICMP error
> packet is not sent to the originating host. Note
> that the device type for IPv4 tunnels is set to
> ARPHRD_TUNNEL.
> 
> Fix is to expect a tunnel device type of
> ARPHRD_TUNNEL6 instead.  Now the tunnel device
> type matches and the ICMP error packet is sent
> to the originating host.
> 
> Signed-off-by: Sheena Mira-ato <sheena.mira-ato@alliedtelesis.co.nz>

This change is already in my tree, why are you resubmitting it?

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

* [PATCH] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type
@ 2019-04-09 20:36 Sheena Mira-ato
  2019-04-11 21:15 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Sheena Mira-ato @ 2019-04-09 20:36 UTC (permalink / raw)
  To: netdev, davem, kuznet, yoshfuji; +Cc: Sheena Mira-ato

The device type for ip6 tunnels is set to
ARPHRD_TUNNEL6. However, the ip4ip6_err function
is expecting the device type of the tunnel to be
ARPHRD_TUNNEL.  Since the device types do not
match, the function exits and the ICMP error
packet is not sent to the originating host. Note
that the device type for IPv4 tunnels is set to
ARPHRD_TUNNEL.

Fix is to expect a tunnel device type of
ARPHRD_TUNNEL6 instead.  Now the tunnel device
type matches and the ICMP error packet is sent
to the originating host.

Signed-off-by: Sheena Mira-ato <sheena.mira-ato@alliedtelesis.co.nz>
---
 net/ipv6/ip6_tunnel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 0c6403cf8b52..ade1390c6348 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -627,7 +627,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
 		rt = ip_route_output_ports(dev_net(skb->dev), &fl4, NULL,
 					   eiph->daddr, eiph->saddr, 0, 0,
 					   IPPROTO_IPIP, RT_TOS(eiph->tos), 0);
-		if (IS_ERR(rt) || rt->dst.dev->type != ARPHRD_TUNNEL) {
+		if (IS_ERR(rt) || rt->dst.dev->type != ARPHRD_TUNNEL6) {
 			if (!IS_ERR(rt))
 				ip_rt_put(rt);
 			goto out;
@@ -636,7 +636,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
 	} else {
 		if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos,
 				   skb2->dev) ||
-		    skb_dst(skb2)->dev->type != ARPHRD_TUNNEL)
+		    skb_dst(skb2)->dev->type != ARPHRD_TUNNEL6)
 			goto out;
 	}
 
-- 
2.21.0


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

end of thread, other threads:[~2019-04-11 22:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-01  0:04 [PATCH] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type Sheena Mira-ato
2019-04-02 20:20 ` David Miller
2019-04-09 20:36 Sheena Mira-ato
2019-04-11 21:15 ` David Miller
2019-04-11 22:29   ` Sheena Mira-ato

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.