aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/esp6.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-12 00:25:15 -0700
committerDavid S. Miller <davem@davemloft.net>2012-07-12 00:25:15 -0700
commitec18d9a2691d69cd14b48f9b919fddcef28b7f5c (patch)
tree4d10135edfe25d4ff56e39330b0f7797b2034b8a /net/ipv6/esp6.c
parentipv6: Add ip6_redirect() and ip6_sk_redirect() helper functions. (diff)
downloadlinux-dev-ec18d9a2691d69cd14b48f9b919fddcef28b7f5c.tar.xz
linux-dev-ec18d9a2691d69cd14b48f9b919fddcef28b7f5c.zip
ipv6: Add redirect support to all protocol icmp error handlers.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/esp6.c')
-rw-r--r--net/ipv6/esp6.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 89a615ba84f8..6dc7fd353ef5 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -434,16 +434,19 @@ static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
struct xfrm_state *x;
if (type != ICMPV6_DEST_UNREACH &&
- type != ICMPV6_PKT_TOOBIG)
+ type != ICMPV6_PKT_TOOBIG &&
+ type != NDISC_REDIRECT)
return;
x = xfrm_state_lookup(net, skb->mark, (const xfrm_address_t *)&iph->daddr,
esph->spi, IPPROTO_ESP, AF_INET6);
if (!x)
return;
- pr_debug("pmtu discovery on SA ESP/%08x/%pI6\n",
- ntohl(esph->spi), &iph->daddr);
- ip6_update_pmtu(skb, net, info, 0, 0);
+
+ if (type == NDISC_REDIRECT)
+ ip6_redirect(skb, net, 0, 0);
+ else
+ ip6_update_pmtu(skb, net, info, 0, 0);
xfrm_state_put(x);
}