Re: git: b88df1e893c4 - main - Reapply "sbin/ping: allow normal users to specify larger packets"

From: Pedro Giffuni <pfg_at_freebsd.org>
Date: Mon, 21 Oct 2024 18:18:23 UTC
 Sorry ...
I completely missed this was causing any trouble. My filters threw the reply into a folder that I don't look at regularly.
Thanks to markj@ for backing it out. 
Pedro.
    On Friday, October 18, 2024 at 02:41:12 PM GMT-5, maxim@freebsd.org <maxim@freebsd.org> wrote:  
 
 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