diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2013-01-15 07:38:53 -0500 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2013-01-21 06:43:54 -0500 |
commit | 05ab86c55683410593720003442dde629782aaac (patch) | |
tree | 9a35cdd3157094965e54e63fcc58af4f1e07bb35 /net/ipv4/esp4.c | |
parent | 5b653b2a1c3b5634368fde2df958a1398481e580 (diff) |
xfrm4: Invalidate all ipv4 routes on IPsec pmtu events
On IPsec pmtu events we can't access the transport headers of
the original packet, so we can't find the socket that sent
the packet. The only chance to notify the socket about the
pmtu change is to force a relookup for all routes. This
patch implenents this for the IPsec protocols.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv4/esp4.c')
-rw-r--r-- | net/ipv4/esp4.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index fd26ff4f3eac..3b4f0cd2e63e 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c | |||
@@ -502,9 +502,12 @@ static void esp4_err(struct sk_buff *skb, u32 info) | |||
502 | if (!x) | 502 | if (!x) |
503 | return; | 503 | return; |
504 | 504 | ||
505 | if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) | 505 | if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) { |
506 | atomic_inc(&flow_cache_genid); | ||
507 | rt_genid_bump(net); | ||
508 | |||
506 | ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_ESP, 0); | 509 | ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_ESP, 0); |
507 | else | 510 | } else |
508 | ipv4_redirect(skb, net, 0, 0, IPPROTO_ESP, 0); | 511 | ipv4_redirect(skb, net, 0, 0, IPPROTO_ESP, 0); |
509 | xfrm_state_put(x); | 512 | xfrm_state_put(x); |
510 | } | 513 | } |