From nobody Thu Nov 14 03:25:06 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 4Xplrz2Mmhz5d0v2; Thu, 14 Nov 2024 03:25:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xplry5Kmkz4Gnm; Thu, 14 Nov 2024 03:25:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nxg5QFjyfQQtfVff1ieYDFYUoQfaVQ4roBxEbjRV7DA=; b=tXWnORyQ4+IbrNNuwf36gnPxewxY7qv5r3FxdANDNRBD4+HKJv1m4KduYyyA/3SfAysZbC t3eaYMN4waAQUcTgwFNhADlP/E1dch9b58kqjAGT6Xs/MHnsdSDy9H5klMuSu0FdIYvitb xOpmGY9V0GvEdrQE26nWmUSlk5FgL2MZPxYRBENPr99+NExhep2vH+GUXs06AgtZ8dLed7 rQsp59ueH8uQmbIQ8GK5f4RPqztIl83CdivMSvxNPgoDjiKinchIBu13gj6T29VJnkzkdB GGCHVlmuZZL/Z8KC8e1E0AugnlFFir4kwK4CsvhIQJOi3xZ6fpI9VATq9+GxvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nxg5QFjyfQQtfVff1ieYDFYUoQfaVQ4roBxEbjRV7DA=; b=lOyCVZEg149aW5wXRmlb7Z3UGJJw+ujl0y4wHeBcoDkSUGMsWzAqsSfuC76giD5Ad7eJv+ lLtUDtWVF0XWUWP6LRIXWvDTP+MA9f9KldAO3lkh9c6bPsTjSlIBKKqTS/cY9b11PB531z RmYms7Yp02lCQphoLv2XpoQiVMlsjfkS+KKaKAXLUSaT8sOryNdz5F4YPI/qJW1akFruEF WJD/9EiTk13pwQME9OW0ORY6uHy4n4AE1QZOydbMlb3Nq2AeHRlwM57N+pDoJ2tzalthi4 OLOdqE03UzcZjDEagw75zy3rqSi+BnB5QdGq9mkKucyE0/dppUYiPAt9RRWqQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731554706; a=rsa-sha256; cv=none; b=XgC2HrTtFOvS1TsKTJVahtKfI5NLCh5Einqi0qmt0+QZs8zymwAsfYgNYFaugWNtKN683o pgacELE/6otghyhPiwm/ckx4V4VCPzh29pVbpqs2KTOb+GMyjxuKtCJoUMFEp2frLty4d0 +ZkzaCOZpZATmmR1OSP+2H1+WR6dfMxzn6sTT7ZSCtxT8jvebiIj8wzWyRPSaUdvKJFrjS fDSWigNwxSizcKOCD5Nlckvm5TDRUlXIny9LSxUrannx53oLxDKJ9rp2i/iDRkcmteEKgF ZQq/oQDZ3cxutXU9fb4P4zmuXnr/szanOkGWwPkoiV14RyT9GPFnH31d5M2H3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xplry4v6GzMNL; Thu, 14 Nov 2024 03:25:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE3P6XT024900; Thu, 14 Nov 2024 03:25:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE3P6Rj024897; Thu, 14 Nov 2024 03:25:06 GMT (envelope-from git) Date: Thu, 14 Nov 2024 03:25:06 GMT Message-Id: <202411140325.4AE3P6Rj024897@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 4c7c29a020c5 - stable/14 - ping: tests: Align with Scapy defaults 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=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4c7c29a020c5235eca369c89b9cc750a1d4e4656 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=4c7c29a020c5235eca369c89b9cc750a1d4e4656 commit 4c7c29a020c5235eca369c89b9cc750a1d4e4656 Author: Jose Luis Duran AuthorDate: 2024-11-05 02:48:34 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-14 03:23:00 +0000 ping: tests: Align with Scapy defaults Align some of pinger() defaults with Scapy to facilitate debugging when printing packets. No functional change intended. Reviewed by: emaste, kp Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D47159 (cherry picked from commit 4859030ef193688153f490915794ae9ab77f012b) --- sbin/ping/tests/test_ping.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 90df07d0e5b9..cf2e46a146c8 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -63,14 +63,14 @@ def build_response_packet(echo, ip, icmp, oip_ihl, special): if icmp.type in icmp_id_seq_types: pkt = ip / icmp / load else: - ip.options = "" + del ip.options pkt = ip / icmp / oip / oicmp / load return pkt def generate_ip_options(opts): if not opts: - return "" + return [] routers = [ "192.0.2.10", @@ -118,7 +118,7 @@ def generate_ip_options(opts): ToolsHelper.set_sysctl("net.inet.ip.process_options", 0) options = b"\x9f" * 40 else: - options = "" + options = [] return options @@ -134,7 +134,7 @@ def pinger( icmp_code: sc.scapy.fields.MultiEnumField, # IP arguments ihl: Optional[sc.scapy.fields.BitField] = None, - flags: Optional[sc.scapy.fields.FlagsField] = None, + flags: Optional[sc.scapy.fields.FlagsField] = 0, opts: Optional[str] = None, oip_ihl: Optional[sc.scapy.fields.BitField] = None, special: Optional[str] = None, @@ -169,7 +169,7 @@ def pinger( :keyword ihl: Internet Header Length, defaults to None :type ihl: class:`scapy.fields.BitField`, optional - :keyword flags: IP flags - one of `DF`, `MF` or `evil`, defaults to None + :keyword flags: IP flags - one of `DF`, `MF` or `evil`, defaults to 0 :type flags: class:`scapy.fields.FlagsField`, optional :keyword opts: Include IP options - one of `EOL`, `NOP`, `NOP-40`, `unk`, `unk-40`, `RR`, `RR-same`, `RR-trunc`, `LSRR`, `LSRR-trunc`, `SSRR` or