Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Oct 2024 05:18:42 +0000 (UTC)
From:      Pedro Giffuni <pfg@freebsd.org>
To:        "maxim@freebsd.org" <maxim@freebsd.org>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>,  "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>,  "dev-commits-src-main@freebsd.org" <dev-commits-src-main@freebsd.org>
Subject:   Re: git: 80a5b26871e9 - main - sbin/ping: allow normal users  to specify larger packets
Message-ID:  <1108313894.2410377.1729055922813@mail.yahoo.com>
In-Reply-To: <4c41b78e-b560-08ef-0070-017f21d4c8eb@maxim.int.ru>
References:  <202410160106.49G16qS7012339@gitrepo.freebsd.org> <4c41b78e-b560-08ef-0070-017f21d4c8eb@maxim.int.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_2410376_1281775549.1729055922812
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

 Hi;
Yes sorry .. I will be reverting the commit.
Pedro.
    On Tuesday, October 15, 2024 at 09:43:00 PM GMT-5, <maxim@freebsd.org> =
wrote: =20
=20
 Hi Pedro,

> index d9d544bc75c8..e6b1247af497 100644
> --- a/sbin/ping/ping.c
> +++ b/sbin/ping/ping.c
> @@ -96,8 +96,8 @@
>=C2=A0 #define=C2=A0=C2=A0=C2=A0 DEFDATALEN=C2=A0=C2=A0=C2=A0 56=C2=A0=C2=
=A0=C2=A0 =C2=A0=C2=A0=C2=A0 /* default data length */
>=C2=A0 #define=C2=A0=C2=A0=C2=A0 FLOOD_BACKOFF=C2=A0=C2=A0=C2=A0 20000=C2=
=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 /* usecs to back off if F_FLOOD mode */
>=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=
=A0=C2=A0 =C2=A0=C2=A0=C2=A0 /* runs out of buffer space */
> -#define=C2=A0=C2=A0=C2=A0 MAXIPLEN=C2=A0=C2=A0=C2=A0 (sizeof(struct ip) =
+ MAX_IPOPTLEN)
> -#define=C2=A0=C2=A0=C2=A0 MAXICMPLEN=C2=A0=C2=A0=C2=A0 (ICMP_ADVLENMIN +=
 MAX_IPOPTLEN)
> +#define=C2=A0=C2=A0=C2=A0 MAXIPLEN=C2=A0=C2=A0=C2=A0 ((int)sizeof(struct=
 ip) + MAX_IPOPTLEN)
> +#define=C2=A0=C2=A0=C2=A0 MAXPAYLOAD=C2=A0=C2=A0=C2=A0 (IP_MAXPACKET - M=
AXIPLEN - ICMP_MINLEN)

This doesn't look right.

Before:

# ping -s 65507 -c 1 127.0.0.1
ING 127.0.0.1 (127.0.0.1): 65507 data bytes
65515 bytes from 127.0.0.1: icmp_seq=3D0 ttl=3D64 time=3D0.194 ms
..

Now:

# /usr/obj/usr/home/maxim/fbsd/src/amd64.amd64/sbin/ping/ping -s 65507
-c 1 127.0.0.1
ping: packet size too large: 65507 > 65467

Not sure if the tests catch this.

Maxim

--=20
Maxim Konovalov
 =20
------=_Part_2410376_1281775549.1729055922812
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div class=3D"ydp43ce26adyahoo-style-wrap" style=
=3D"font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px=
;"><div></div>
        <div dir=3D"ltr" data-setdir=3D"false">Hi;</div><div dir=3D"ltr" da=
ta-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">Yes so=
rry .. I will be reverting the commit.</div><div dir=3D"ltr" data-setdir=3D=
"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">Pedro.</div><div><=
br></div>
       =20
        </div><div id=3D"ydp92a3cb3ayahoo_quoted_9467095958" class=3D"ydp92=
a3cb3ayahoo_quoted">
            <div style=3D"font-family:'Helvetica Neue', Helvetica, Arial, s=
ans-serif;font-size:13px;color:#26282a;">
               =20
                <div>
                        On Tuesday, October 15, 2024 at 09:43:00 PM GMT-5, =
 &lt;maxim@freebsd.org&gt; wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
               =20
               =20
                <div><div dir=3D"ltr">Hi Pedro,<div class=3D"ydp92a3cb3ayqt=
4056528455" id=3D"ydp92a3cb3ayqtfd75193"><br clear=3D"none"><br clear=3D"no=
ne">&gt; index d9d544bc75c8..e6b1247af497 100644<br clear=3D"none">&gt; ---=
 a/sbin/ping/ping.c<br clear=3D"none">&gt; +++ b/sbin/ping/ping.c<br clear=
=3D"none">&gt; @@ -96,8 +96,8 @@<br clear=3D"none">&gt;&nbsp; #define&nbsp;=
&nbsp;&nbsp; DEFDATALEN&nbsp;&nbsp;&nbsp; 56&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=
&nbsp; /* default data length */<br clear=3D"none">&gt;&nbsp; #define&nbsp;=
&nbsp;&nbsp; FLOOD_BACKOFF&nbsp;&nbsp;&nbsp; 20000&nbsp;&nbsp;&nbsp; &nbsp;=
&nbsp;&nbsp; /* usecs to back off if F_FLOOD mode */<br clear=3D"none">&gt;=
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp=
;&nbsp; &nbsp;&nbsp;&nbsp; /* runs out of buffer space */<br clear=3D"none"=
>&gt; -#define&nbsp;&nbsp;&nbsp; MAXIPLEN&nbsp;&nbsp;&nbsp; (sizeof(struct =
ip) + MAX_IPOPTLEN)<br clear=3D"none">&gt; -#define&nbsp;&nbsp;&nbsp; MAXIC=
MPLEN&nbsp;&nbsp;&nbsp; (ICMP_ADVLENMIN + MAX_IPOPTLEN)<br clear=3D"none">&=
gt; +#define&nbsp;&nbsp;&nbsp; MAXIPLEN&nbsp;&nbsp;&nbsp; ((int)sizeof(stru=
ct ip) + MAX_IPOPTLEN)<br clear=3D"none">&gt; +#define&nbsp;&nbsp;&nbsp; MA=
XPAYLOAD&nbsp;&nbsp;&nbsp; (IP_MAXPACKET - MAXIPLEN - ICMP_MINLEN)</div><br=
 clear=3D"none"><br clear=3D"none">This doesn't look right.<br clear=3D"non=
e"><br clear=3D"none">Before:<br clear=3D"none"><br clear=3D"none"># ping -=
s 65507 -c 1 127.0.0.1<br clear=3D"none">ING 127.0.0.1 (127.0.0.1): 65507 d=
ata bytes<br clear=3D"none">65515 bytes from 127.0.0.1: icmp_seq=3D0 ttl=3D=
64 time=3D0.194 ms<br clear=3D"none">..<br clear=3D"none"><br clear=3D"none=
">Now:<br clear=3D"none"><br clear=3D"none"># /usr/obj/usr/home/maxim/fbsd/=
src/amd64.amd64/sbin/ping/ping -s 65507<br clear=3D"none">-c 1 127.0.0.1<br=
 clear=3D"none">ping: packet size too large: 65507 &gt; 65467<br clear=3D"n=
one"><br clear=3D"none">Not sure if the tests catch this.<br clear=3D"none"=
><br clear=3D"none">Maxim<br clear=3D"none"><br clear=3D"none">-- <br clear=
=3D"none">Maxim Konovalov<div class=3D"ydp92a3cb3ayqt4056528455" id=3D"ydp9=
2a3cb3ayqtfd17163"><br clear=3D"none"></div></div></div>
            </div>
        </div></body></html>
------=_Part_2410376_1281775549.1729055922812--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1108313894.2410377.1729055922813>