From: David Miller <davem@davemloft.net>
To: googuy@gmail.com
Cc: kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] icmp: Restore resistence to abnormal messages
Date: Mon, 14 Nov 2016 13:36:46 -0500 (EST) [thread overview]
Message-ID: <20161114.133646.1687576478968660327.davem@davemloft.net> (raw)
In-Reply-To: <20161111202018.13795-1-googuy@gmail.com>
From: Vicente Jimenez Aguilar <googuy@gmail.com>
Date: Fri, 11 Nov 2016 21:20:18 +0100
> @@ -819,6 +820,12 @@ static bool icmp_unreach(struct sk_buff *skb)
> /* fall through */
> case 0:
> info = ntohs(icmph->un.frag.mtu);
> + /* Handle weird case where next hop MTU is
> + * equal to or exceeding dropped packet size
> + */
> + old_mtu = ntohs(iph->tot_len);
> + if (info >= old_mtu)
> + info = old_mtu - 2;
This isn't something the old code did.
The old code behaved much differently.
In the case where the new mtu was smaller than 68 or larger than
the iph->tot_len value, it would do several things:
1) First it would check for a BSD 4.2 anomaly and subtract old_mtu
by the IP header length.
2) Second, it would try to guess the intended MTU using the
mtu_plateau table.
I don't see any code where a subtraction by a fixed constant of 2
occurred.
Nor can I figure out what that might accomplish. If you really
want to do this, you have to docuement what this 2 means, what
it is accomplishing, and why you have choosen to accomplish it
this way.
Thanks.
next prev parent reply other threads:[~2016-11-14 18:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 20:20 [PATCH] icmp: Restore resistence to abnormal messages Vicente Jimenez Aguilar
2016-11-14 18:36 ` David Miller [this message]
2016-11-15 16:49 ` Vicente Jiménez
2016-11-15 16:56 ` David Miller
2016-11-15 17:30 ` Florian Westphal
2016-11-15 19:32 ` Vicente Jiménez
2016-11-16 1:14 ` Florian Westphal
2016-11-17 1:17 ` Vicente Jiménez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161114.133646.1687576478968660327.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=googuy@gmail.com \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).