From nobody Wed Sep 07 03:55:34 2022 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 4MMpLv3MzXz4bQ6r; Wed, 7 Sep 2022 03:55:35 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MMpLv0pbZz3SCT; Wed, 7 Sep 2022 03:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662522935; 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=NqnhnU7DgjktBuBYvrDMo6m1sL4y1ByrrsSIOUxmoSc=; b=bBFw1LVvabn7G6CujK5RdAGob8Tfuuu/PBJXpUBGaZJEcJnEonj7LLGqw+59zvAb0dkVAO bwrcEUkYGyuQEmQMLSwMyw+reZKWqnv3xt3MIuTRdkK1/KaUJ2RMLzDyycYUt0yfzmAyYW DWZ7FSg1fPGu8mcZJQ9+EEZLsQd7YjtVGJskI19Qy76PSegMFlgoO29fZjllZRPiBdYDiO SKAoUOD4qU0nTKAFZNEwzheyI1itk4wjGy8FvVFzax+hO2lY2nWotqylB+KqHZKmYTYw30 RJw5UtBzB9nOe0G+0Sx/q5CqfxE5fNZmDy9e4/dK88g7ML2n5APPksumnphXXg== 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 4MMpLt6zRbzP7w; Wed, 7 Sep 2022 03:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2873tYdQ069849; Wed, 7 Sep 2022 03:55:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2873tYIV069848; Wed, 7 Sep 2022 03:55:34 GMT (envelope-from git) Date: Wed, 7 Sep 2022 03:55:34 GMT Message-Id: <202209070355.2873tYIV069848@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 322b5b7c1666 - main - tests: partial revert of 4627bc1e90fd17c8d4f44de6b932d456b67661fc 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 322b5b7c16666c40d2763f18c1a51e6f0580d4e9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662522935; 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=NqnhnU7DgjktBuBYvrDMo6m1sL4y1ByrrsSIOUxmoSc=; b=FCsNNh/710VOfN+h1wGYeml1Xgz+T3+ymzNYkRsmtmBKcq7+n6jOeZF6pFr/QvuhgrtYu+ QBnP+7otEcF2yEFrdhys3zNcBzVOLFTYrRgQWPdAvZBKnZilbYj8qSEkyBOFvA/HnmaHDO ovncuUOCw+zye1L1iGWU7bQQp+T8Wdk6AeoHc8I/JcHtbuMaXs8de3VPKfths8+A+4Doxv 1eypnQHXBwU5KkaHr3aa1MNDnPpbGrJDifSWmRw/wTQ5tPLi2/AyVGLBUDiuviO+in7X9+ okIXgWCnNW+Iox8OLfv9Ar0iRewrvN16dhdnWCBw9eZRsmtvIMIbungvBdPRpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662522935; a=rsa-sha256; cv=none; b=H2owgglZsp7JQqvPyW7S8Ql5G+8hYMDXSmzXlKn753563cM9L7yOtRSmQJ9gdjWVBa85Fb BLP00Y+lTeSSo0EJNhglwz/MKnZNsUtjMgGhZ6ixI3VoLDfyAogUbVWyNkmSL/Ac+8xEq/ Wm4g6YLiOzjr7EsjQ+NKxVkrywxu89jk0JGZfdjaxcoaUGPtxBNL55m0hEDfExroXzJTpS 28Z3bB7YZm2pB/w659h6anjzcksCBj00VDj2PMj5Xx5Htj4J/t8GeIZ8NCi83Jxi6MkeyZ QRwcaohTnIVTkPsNqtW+V4rb1Z0CN6PLrLDzBdIRJqxhFH/jH9rYjgfADCT70w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=322b5b7c16666c40d2763f18c1a51e6f0580d4e9 commit 322b5b7c16666c40d2763f18c1a51e6f0580d4e9 Author: Gleb Smirnoff AuthorDate: 2022-09-07 03:54:49 +0000 Commit: Gleb Smirnoff CommitDate: 2022-09-07 03:54:49 +0000 tests: partial revert of 4627bc1e90fd17c8d4f44de6b932d456b67661fc Python's socketmodule isn't able to construct sockaddr when it doesn't recognize the address family. Until this is solved in python let the tests use the compatibility way to create divert(4) socket. --- tests/sys/common/divert.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/sys/common/divert.py b/tests/sys/common/divert.py index 44b1f49ae13f..94e20a03571f 100755 --- a/tests/sys/common/divert.py +++ b/tests/sys/common/divert.py @@ -36,7 +36,7 @@ import scapy.all as sc import argparse -PF_DIVERT = 44 +IPPROTO_DIVERT = 258 def parse_args(): @@ -52,14 +52,14 @@ def parse_args(): def ipdivert_ip_output_remote_success(args): packet = sc.IP(dst=args.dip) / sc.ICMP(type='echo-request') - with socket.socket(PF_DIVERT, socket.SOCK_RAW, 0) as s: + with socket.socket(socket.AF_INET, socket.SOCK_RAW, IPPROTO_DIVERT) as s: s.bind(('0.0.0.0', args.divert_port)) s.sendto(bytes(packet), ('0.0.0.0', 0)) def ipdivert_ip6_output_remote_success(args): packet = sc.IPv6(dst=args.dip) / sc.ICMPv6EchoRequest() - with socket.socket(PF_DIVERT, socket.SOCK_RAW, 0) as s: + with socket.socket(socket.AF_INET, socket.SOCK_RAW, IPPROTO_DIVERT) as s: s.bind(('0.0.0.0', args.divert_port)) s.sendto(bytes(packet), ('0.0.0.0', 0)) @@ -67,7 +67,7 @@ def ipdivert_ip6_output_remote_success(args): def ipdivert_ip_input_local_success(args): """Sends IPv4 packet to OS stack as inbound local packet.""" packet = sc.IP(dst=args.dip,src=args.sip) / sc.ICMP(type='echo-request') - with socket.socket(PF_DIVERT, socket.SOCK_RAW, 0) as s: + with socket.socket(socket.AF_INET, socket.SOCK_RAW, IPPROTO_DIVERT) as s: s.bind(('0.0.0.0', args.divert_port)) s.sendto(bytes(packet), (args.dip, 0))