From nobody Wed Oct 16 05:18:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSzlW6hmtz5ZW4W for ; Wed, 16 Oct 2024 05:18:47 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from sonic317-34.consmr.mail.ne1.yahoo.com (sonic317-34.consmr.mail.ne1.yahoo.com [66.163.184.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSzlW5C89z4Wbx for ; Wed, 16 Oct 2024 05:18:47 +0000 (UTC) (envelope-from pfg@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1729055925; bh=ZhJ1vQgpJq/N0RObTvO2mjyPgV2v2vUPBcrLXFOhFgY=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=LVTwPJ2ocS1bLpfy9g83Xu8fr7rZHvNyYBt2F4uvM0gDtlGm0HR9PchxUpK4C+e8bY8s0GEs3V/pQQU+AtvZW8uIe/ZFLWq4jxv1jx4qmYH/aQsR3Hm377zBWFl0fSE7Fc5w+7E7BUvzznEl7JNcToqInx3FezrFSxyOJr8W+zrOOU0WncFLhE5NOwtUFlIufQjNoOc/XxS+qwNYUYMFSddDUk9BITxdIWrUoadzO4p5eOYRa/FBqfwNGeAdFn+ezm4lLloI0727vEaQ8LxeAxyDWWAPI0U6tP0x6/961PGQ4ZSqVzyp1NlLtfPMqLX2f7upoFuu/ZwlX57sQFA+5g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1729055925; bh=RXmCcrrDkPDx0L2c5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k8Iqf kbAoq52ibg_4rEXn2cFQXKJ_22h7RaHjiMxkPxMiclCZL9tfH9B7WJL8Da8_8HH1GDlJ5EgOXKrG nWy03nDdYyKYGte9IexjSjUaG_mb1yph7zTngygyWL9a3ThVYqKPa8ZKNg6rPXBPw_L2VwQIcbkY NgWozSpy1oKoFNUaJ1JXvHEDvetoWtlZxjuBrKgoLz4vMGP7Y7Rq7A7hjsZkanI4.1w81KtzWP6e nZ03zct5akVfrLc3Zj_oQjUYqVdv9NZZ3R_lMky.quEFI3Aresl80P1nJAQGxsTwYnqnACuCt7yT fw74dA6D_a4FkLTryromqDeiI.6MQQMX.7tE3epmWxgjEY3I_HWHDInWa7_KDWjq29522cpFQdZf J_SaywBUah3e0y3IMTfU0IHQ3oyiCGbtX4d78s3ngYwDJ3cdrYrPO.0MeTM2BbkN3R5ZTGpnOwRK jtNxGFIvfpwogm8Eu0m99zo08LrgIE2UyjVrGtHZFIvRZ2IOpWnRRBxevj08Pi1Zv17Sen3gHHzL eF.7UiJrfnw4ajOy4 X-Sonic-MF: X-Sonic-ID: dcca5fcf-a550-4118-ba46-7977c74c5da2 Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Wed, 16 Oct 2024 05:18:45 +0000 Date: Wed, 16 Oct 2024 05:18:42 +0000 (UTC) From: Pedro Giffuni To: "maxim@freebsd.org" Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" 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> Subject: Re: git: 80a5b26871e9 - main - sbin/ping: allow normal users to specify larger packets List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2410376_1281775549.1729055922812" X-Mailer: WebService/1.1.22806 YMailNorrin X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US] X-Rspamd-Queue-Id: 4XSzlW5C89z4Wbx X-Spamd-Bar: ---- ------=_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, = 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
Hi;

Yes so= rry .. I will be reverting the commit.

Pedro.
<= br>
=20
=20
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 @@
>  #define =    DEFDATALEN    56      =   /* default data length */
>  #define =    FLOOD_BACKOFF    20000     =    /* usecs to back off if F_FLOOD mode */
>=                 = ;      /* runs out of buffer space */
> -#define    MAXIPLEN    (sizeof(struct = ip) + MAX_IPOPTLEN)
> -#define    MAXIC= MPLEN    (ICMP_ADVLENMIN + MAX_IPOPTLEN)
&= gt; +#define    MAXIPLEN    ((int)sizeof(stru= ct ip) + MAX_IPOPTLEN)
> +#define    MA= XPAYLOAD    (IP_MAXPACKET - MAXIPLEN - 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 d= ata bytes
65515 bytes from 127.0.0.1: icmp_seq=3D0 ttl=3D= 64 time=3D0.194 ms
..

Now:

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

Not sure if the tests catch this.

Maxim

--
Maxim Konovalov

------=_Part_2410376_1281775549.1729055922812--