Commit 453b6731 authored by Herbert Xu's avatar Herbert Xu Committed by Thomas Graf

[IPSEC]: Fix room calculation in icmp_send

I'm now cleaning up all users of dst_pmtu with the aim of replacing
dst_pmtu with dst_mtu.  I'm going to start with the ones that actually
fix bugs.

This patch fixes the length calculation in icmp_send.  As it is
we're overestimating the space available by including the space
that would be used up by IPsec encapsulation.

IPv6 doesn't have this problem since its calculation is based
on 1280 instead of the PMTU.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4193b1c2
......@@ -560,7 +560,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, u32 info)
/* RFC says return as much as we can without exceeding 576 bytes. */
room = dst_pmtu(&rt->u.dst);
room = dst_mtu(&rt->u.dst);
if (room > 576)
room = 576;
room -= sizeof(struct iphdr) + icmp_param.replyopts.optlen;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment