Commit bc280a1e authored by Sheena Mira-ato's avatar Sheena Mira-ato Committed by Greg Kroah-Hartman

ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type

[ Upstream commit b2e54b09 ]

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: default avatarSheena Mira-ato <sheena.mira-ato@alliedtelesis.co.nz>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5589e51f
...@@ -633,7 +633,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, ...@@ -633,7 +633,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
IPPROTO_IPIP, IPPROTO_IPIP,
RT_TOS(eiph->tos), 0); RT_TOS(eiph->tos), 0);
if (IS_ERR(rt) || if (IS_ERR(rt) ||
rt->dst.dev->type != ARPHRD_TUNNEL) { rt->dst.dev->type != ARPHRD_TUNNEL6) {
if (!IS_ERR(rt)) if (!IS_ERR(rt))
ip_rt_put(rt); ip_rt_put(rt);
goto out; goto out;
...@@ -643,7 +643,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, ...@@ -643,7 +643,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
ip_rt_put(rt); ip_rt_put(rt);
if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos, if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos,
skb2->dev) || skb2->dev) ||
skb_dst(skb2)->dev->type != ARPHRD_TUNNEL) skb_dst(skb2)->dev->type != ARPHRD_TUNNEL6)
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment