aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ipcomp6.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-06-15 17:54:11 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-15 17:54:11 -0400
commit81aded24675ebda5de8a68843250ad15584ac38a (patch)
tree84f7bd5cf86cf010394de92efd5e4c5b636b3d20 /net/ipv6/ipcomp6.c
parent36393395536064e483b73d173f6afc103eadfbc4 (diff)
ipv6: Handle PMTU in ICMP error handlers.
One tricky issue on the ipv6 side vs. ipv4 is that the ICMP callouts to handle the error pass the 32-bit info cookie in network byte order whereas ipv4 passes it around in host byte order. Like the ipv4 side, we have two helper functions. One for when we have a socket context and one for when we do not. ip6ip6 tunnels are not handled here, because they handle PMTU events by essentially relaying another ICMP packet-too-big message back to the original sender. This patch allows us to get rid of rt6_do_pmtu_disc(). It handles all kinds of situations that simply cannot happen when we do the PMTU update directly using a fully resolved route. In fact, the "plen == 128" check in ip6_rt_update_pmtu() can very likely be removed or changed into a BUG_ON() check. We should never have a prefixed ipv6 route when we get there. Another piece of strange history here is that TCP and DCCP, unlike in ipv4, never invoke the update_pmtu() method from their ICMP error handlers. This is incredibly astonishing since this is the context where we have the most accurate context in which to make a PMTU update, namely we have a fully connected socket and associated cached socket route. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ipcomp6.c')
-rw-r--r--net/ipv6/ipcomp6.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index 5cb75bfe45b1..92832385a8ef 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -46,6 +46,7 @@
46#include <linux/list.h> 46#include <linux/list.h>
47#include <linux/vmalloc.h> 47#include <linux/vmalloc.h>
48#include <linux/rtnetlink.h> 48#include <linux/rtnetlink.h>
49#include <net/ip6_route.h>
49#include <net/icmp.h> 50#include <net/icmp.h>
50#include <net/ipv6.h> 51#include <net/ipv6.h>
51#include <net/protocol.h> 52#include <net/protocol.h>
@@ -74,6 +75,7 @@ static void ipcomp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
74 75
75 pr_debug("pmtu discovery on SA IPCOMP/%08x/%pI6\n", 76 pr_debug("pmtu discovery on SA IPCOMP/%08x/%pI6\n",
76 spi, &iph->daddr); 77 spi, &iph->daddr);
78 ip6_update_pmtu(skb, net, info, 0, 0);
77 xfrm_state_put(x); 79 xfrm_state_put(x);
78} 80}
79 81