ipsec: Don't update the pmtu on ICMPV6_DEST_UNREACH

Currently we update the pmtu in the IPsec protocol error handlers
if icmpv6 message type is either ICMPV6_DEST_UNREACH or
ICMPV6_PKT_TOOBIG. Updating the pmtu on ICMPV6_DEST_UNREACH
is wrong in any case, it causes strangely fragmented packets.
Only ICMPV6_PKT_TOOBIG signalizes pmtu discovery, so remove the
ICMPV6_DEST_UNREACH check in the IPsec protocol error handlers.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
Steffen Klassert 2013-09-10 13:43:09 +02:00
parent bafd4bd4dc
commit b3b2b9e192
3 changed files with 3 additions and 6 deletions

View File

@ -618,8 +618,7 @@ static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+offset); struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+offset);
struct xfrm_state *x; struct xfrm_state *x;
if (type != ICMPV6_DEST_UNREACH && if (type != ICMPV6_PKT_TOOBIG &&
type != ICMPV6_PKT_TOOBIG &&
type != NDISC_REDIRECT) type != NDISC_REDIRECT)
return; return;

View File

@ -436,8 +436,7 @@ static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
struct ip_esp_hdr *esph = (struct ip_esp_hdr *)(skb->data + offset); struct ip_esp_hdr *esph = (struct ip_esp_hdr *)(skb->data + offset);
struct xfrm_state *x; struct xfrm_state *x;
if (type != ICMPV6_DEST_UNREACH && if (type != ICMPV6_PKT_TOOBIG &&
type != ICMPV6_PKT_TOOBIG &&
type != NDISC_REDIRECT) type != NDISC_REDIRECT)
return; return;

View File

@ -64,8 +64,7 @@ static void ipcomp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
(struct ip_comp_hdr *)(skb->data + offset); (struct ip_comp_hdr *)(skb->data + offset);
struct xfrm_state *x; struct xfrm_state *x;
if (type != ICMPV6_DEST_UNREACH && if (type != ICMPV6_PKT_TOOBIG &&
type != ICMPV6_PKT_TOOBIG &&
type != NDISC_REDIRECT) type != NDISC_REDIRECT)
return; return;