Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2024 19:41:03 +0000 (UTC)
From:      maxim@freebsd.org
To:        "Pedro F. Giffuni" <pfg@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: b88df1e893c4 - main - Reapply "sbin/ping: allow normal  users to specify larger packets"
Message-ID:  <39113afb-66e8-da08-14ab-83564c1271b2@maxim.int.ru>
In-Reply-To: <f0575f7e-e155-85a7-fa7c-5a67af27ef63@maxim.int.ru>
References:  <202410161840.49GIe8CR000407@gitrepo.freebsd.org> <f0575f7e-e155-85a7-fa7c-5a67af27ef63@maxim.int.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Pedro,

Unless you have a plan to address this issue please backout this code
as it is clearly wrong.

Thanks,

Maxim

On Wed, 16 Oct 2024, 19:04-0000, Maxim Konovalov wrote:

> Hi Pedro,
>
> No, this is not right.  Let me clarify:
>
> (1) I never told that there are any issues with the tests.  I just
> mumbled that the tests should catch such regression though I never
> checked if they actually did.
>
> (2) The MAXPAYLOAD calculation in the code below is not fully correct.
>
> It should be
>
> 65535 - 20 (ip header) - 8 (icmp part) = 65507 without IP options
>
> OR
>
> 65535 - 20 (ip header) - 40 (ip options) - 8 (icmp part) = 65467 with
> IP options, ie. whenever you run ping -R.
>
> The code below hardcoded the latter value which is simply wrong.
>
> I wouldn't rely on the fact that you get it from other BSD flavours
> and would recommend to have this code reviewed before committing it.
>
> Maxim
>

-- 
Maxim Konovalov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39113afb-66e8-da08-14ab-83564c1271b2>