diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-11-11 19:06:49 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-13 10:44:05 +0900 |
commit | 929fc0327569aa745c9c3cb68a213c22fad3f3f9 (patch) | |
tree | d891f244d9a5d622685ccc26ca287a73cfb74198 /net/ipv6 | |
parent | 0d728b844c2dd8dd3875ed304eee43967c5d14f6 (diff) | |
download | op-kernel-dev-929fc0327569aa745c9c3cb68a213c22fad3f3f9.zip op-kernel-dev-929fc0327569aa745c9c3cb68a213c22fad3f3f9.tar.gz |
ip6_gre: add the process for redirect in ip6gre_err
This patch is to add redirect icmp packet process for ip6gre by
calling ip6_redirect() in ip6gre_err(), as in vti6_err.
Prior to this patch, there's even no route cache generated after
receiving redirect.
Reported-by: Jianlin Shi <jishi@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6_gre.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 3e10c51..0684d0c 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -369,6 +369,7 @@ static void ip6gre_tunnel_uninit(struct net_device *dev) static void ip6gre_err(struct sk_buff *skb, struct inet6_skb_parm *opt, u8 type, u8 code, int offset, __be32 info) { + struct net *net = dev_net(skb->dev); const struct gre_base_hdr *greh; const struct ipv6hdr *ipv6h; int grehlen = sizeof(*greh); @@ -442,6 +443,10 @@ static void ip6gre_err(struct sk_buff *skb, struct inet6_skb_parm *opt, mtu = IPV6_MIN_MTU; t->dev->mtu = mtu; return; + case NDISC_REDIRECT: + ip6_redirect(skb, net, skb->dev->ifindex, 0, + sock_net_uid(net, NULL)); + return; } if (time_before(jiffies, t->err_time + IP6TUNNEL_ERR_TIMEO)) |