From nobody Fri Oct 18 19:41:03 2024 X-Original-To: dev-commits-src-all@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 4XVZnh1ZVJz5Yrs0; Fri, 18 Oct 2024 19:41:12 +0000 (UTC) (envelope-from maxim@freebsd.org) Received: from maxim.int.ru (maxim.int.ru [167.71.75.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "maxim.int.ru", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVZng2ZRJz4ClX; Fri, 18 Oct 2024 19:41:11 +0000 (UTC) (envelope-from maxim@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 167.71.75.67 is neither permitted nor denied by domain of maxim@freebsd.org) smtp.mailfrom=maxim@freebsd.org; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=freebsd.org (policy=none) Received: from localhost (maxim@localhost [127.0.0.1]) by maxim.int.ru (8.17.1/8.17.1) with ESMTPS id 49IJf3GX046560 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 18 Oct 2024 19:41:04 GMT (envelope-from maxim@freebsd.org) Date: Fri, 18 Oct 2024 19:41:03 +0000 (UTC) From: maxim@freebsd.org To: "Pedro F. Giffuni" 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" In-Reply-To: Message-ID: <39113afb-66e8-da08-14ab-83564c1271b2@maxim.int.ru> References: <202410161840.49GIe8CR000407@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spamd-Result: default: False [-2.89 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : No valid SPF, No valid DKIM,none]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:14061, ipnet:167.71.64.0/20, country:US]; FROM_NO_DN(0.00)[]; FREEFALL_USER(0.00)[maxim]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; MLMMJ_DEST(0.00)[dev-commits-src-main@FreeBSD.org,dev-commits-src-all@FreeBSD.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4XVZng2ZRJz4ClX X-Spamd-Bar: -- 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