summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSheena Mira-ato <sheena.mira-ato@alliedtelesis.co.nz>2019-04-01 13:04:42 +1300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-27 09:30:26 +0200
commiteab63566720f2a78d9aba43bfe21babd2daf980e (patch)
tree0a8641928cf9e0fcc5a441d5ecd530b980f868af
parentc20f5d00dc422b9463fc5643c137c4d95f486b98 (diff)
downloadlinux-stable-eab63566720f2a78d9aba43bfe21babd2daf980e.tar.gz
linux-stable-eab63566720f2a78d9aba43bfe21babd2daf980e.tar.bz2
linux-stable-eab63566720f2a78d9aba43bfe21babd2daf980e.zip
ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type
[ Upstream commit b2e54b09a3d29c4db883b920274ca8dca4d9f04d ] 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> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/ipv6/ip6_tunnel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index cc827e2d83e1..e7e97c13671a 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -638,7 +638,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
IPPROTO_IPIP,
RT_TOS(eiph->tos), 0);
if (IS_ERR(rt) ||
- rt->dst.dev->type != ARPHRD_TUNNEL) {
+ rt->dst.dev->type != ARPHRD_TUNNEL6) {
if (!IS_ERR(rt))
ip_rt_put(rt);
goto out;
@@ -648,7 +648,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
ip_rt_put(rt);
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;
}