From nobody Fri Oct 18 21:15:43 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 4XVctq32ZDz5Yxhf; Fri, 18 Oct 2024 21:15:47 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVctq2XKRz4N5x; Fri, 18 Oct 2024 21:15:47 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729286147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6iCJGPzqhqhgBBGfRlPdrp28vO+LsHCDahqwMPWikQ8=; b=msEkn29rpQYDm79XouZz/PH4YEFWZSFunmeHcxa4hNbxrR77AtK+ARkjY6BANCVcO+4N5N o4KQb9X2ZbDki8ewOzFG3pYu6ioM2vPuXkQEYpym0Hh2+AWq0htpG+Q+bZXUlZ1E5fhExK 0LvPmehgbyMDgOh8kSQI4CjgQg7qMSX1dy+nUFUjbi2EGTxWl8o5EfK8RlQXzRIyajUROm OrWRaB17jzm+f/DAwT8/mJIfcD/6YrHSd9UK3wpOvJ6OXS1DMEMbnseISasiOATgwgYcLm 8yPjqNwR2iyRFnDJKTXbDa9N0tnUBXJI6cRaq9Bv8Vc6URAaAQV6Djl2rFs05g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729286147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6iCJGPzqhqhgBBGfRlPdrp28vO+LsHCDahqwMPWikQ8=; b=p3fiIAj9QY92QIC7eGEZUiC53EToBRBf4VDPEWNY02enPafr0uGgI2kIy1J9Loq7yOODfC oRzBPkn2Sr7JjJoleyqZo9wbF9IKvYxh/+YEVaW43g/4RZp26Xz+fzfoYCnX+ec34zbrnO 7MPxH3Xj5y/VIWTz3/Nb9CP63naURsK1skq11giu7s5c6qExxI6DREj+Df5Q9unztx60lp i0bYr2YcjuF8KGC40TxtxO9W1QW240rxnpLNI2RidqO9q5Vr0jPSmo+9QcipWYwhTpElD6 KbQrzfPWVsliobbqLkqjmHrM6UXkJvXisMG9TOj/MoMaX4Sr7NmgKf+02sFPqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729286147; a=rsa-sha256; cv=none; b=eVAjtDBUedMun8jWPK/0ToNUzG4WUT7vz15IFspZawMd9HsKQlSrLHU6R9f9oeNdNf2DGo PkBwbMkpFguXzhbJPJrtzN3HxDvCN/kLqhy9ZIvmFzwIguCWhJ8Qd+1IMACLNa+/T+Yung +Q6K+i91Kpke1s5pRSI+eUok5dqFgPamK6TpXZ49W6ZzKxbl40zNCHRBJilmjMeAEcCeRQ 7l2xYO6DRpo6iP5wU4aGcWATZzQ7ivRrujlRIg/XM2J3wniuR5JliuIROAxvIpCO5wWTFk c7MKfzZ6xTm6cWVnVcxRVSviHvnHM4GFQwa7BbKTR+Tj96dJLvZ+NirSK1Ugng== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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 did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XVctp583rzMll; Fri, 18 Oct 2024 21:15:46 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 18 Oct 2024 14:15:43 -0700 From: Gleb Smirnoff 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" Message-ID: 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 Content-Disposition: inline In-Reply-To: <202410161840.49GIe8CR000407@gitrepo.freebsd.org> Hi Pedro, let me help to explain you what Maxim is talking about. ping(8) before your change: # ping -c 1 -s 65507 10.1.10.1 PING 10.1.10.1 (10.1.10.1): 65507 data bytes 65515 bytes from 10.1.10.1: icmp_seq=0 ttl=64 time=2.078 ms --- 10.1.10.1 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 2.078/2.078/2.078/0.000 ms After your change: # ping -s 65507 10.1.10.1 ping: packet size too large: 65507 > 65467 This is the regression Maxim is pointing you at. Also, after your patch (running from non-root): > ping -s 10000 10.1.10.1 PING 10.1.10.1 (10.1.10.1): 10000 data bytes ping: sendto: Message too long And this just shows that you didn't even fully achieve what you wanted. To achieve what you want, you first need to fully revert your patch, and then apply the attached patch. It will consistently disable all the size checks that _our_ ping has, instead of incorrectly and blindly applying a diff from DragonflyBSD. HOWEVER, PLEASE DO NOT COMMIT the attached patch! Please revert what you already committed and start a normal review process on phabricator. You can use my attached patch as a start. Please put both the #network group and the #secteam group. This is a kind of sensitive change that can't be done by a drive by commit. P.S. If you are pinging FreeBSD host, the other side needs to have increased maxfrag to reply: # sysctl net.inet.ip.maxfragsperpacket=44 -- Gleb Smirnoff