From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id B3B471DDC9; Sat, 29 Nov 2025 13:26:12 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 4F63A1DDAF; Sat, 29 Nov 2025 13:26:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-b4-smtp.messagingengine.com (fout-b4-smtp.messagingengine.com [202.12.124.147]) by atuin.qyliss.net (Postfix) with ESMTPS id 42B4F1DDA8 for ; Sat, 29 Nov 2025 13:26:08 +0000 (UTC) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id C4FA01D00280; Sat, 29 Nov 2025 08:26:05 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Sat, 29 Nov 2025 08:26:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1764422765; x=1764509165; bh=lrZdIuE/i/ FGmIDFJK7881agQjHK5cvMcuHka66td1E=; b=GskarxXd2t/oybtKf/sO4ZIv5z t2VUSD2mODTR6c7An1YEe3PHJ4PmTxwscpKR7IL6ELKZZdJNWcFCtDP6ZIqdBTBo hp5DVskuxqpDJQ6MZrOZjtIGmQFdfnoP0lcn87Cb54ZCCVcOn8OVCZQlHtqk/Is4 saKwhttlyU9ZmoJiruNMsxXJNNvu04WvCVLtt5J7iqemKqsiMsKYQUN+qPzORMST MdXOTaZTmiDaBkNg5D9w0vRCPA8ygYGSnO5v7AX+cQXEUDDECN02ql/L1+vzNjTt 6LEuUbZMm2UQ/4jAK0R7HLjx/oHNRAQCXEXtDR5olS+If69e1lIKGPJqfIHA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1764422765; x=1764509165; bh=lrZdIuE/i/FGmIDFJK7881agQjHK5cvMcuH ka66td1E=; b=dFIh11fHowVat9tbrc5wVi+yLOnAgW99IyWHJuLGDgM3oAXrG0g U8qOqZjEwmkwkhJFr+0fb8VgTWQmLFu7KQhY+LDFSKEvYUpduMk+KVsuVLe3PQB8 suUluLr8NzFhVHC7tVRY8r7cWNW/zIFW0R59MYzesYwpvFoxIAHShXfPn5491jqu GM6jDgH6N2oiLOSYfD2k3G9bZVyOGJDuD4p1n1FmxHA0HUeJHTZpXRYlvvNqtOJO VAgo113Vb36h3F8tz4r7bT1iSqEhDTgIL5GD4PNafEp2k8SEaX9VtglkLGiOJXvr nwv411qOOnFQN+bAzNorFY/JHmJS09VWIQQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvhedvheekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffffkgggtsehgtderredttddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeeiudffue eilefgtefgtddttdekkeehkefgheekudefveetgeefiefftedvteeuveenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrd hishdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep hihurhgvkhgrsegthigsvghrtghhrghoshdruggvvhdprhgtphhtthhopeguvghvvghlse hsphgvtghtrhhumhdqohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 29 Nov 2025 08:26:04 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id 99A642DB7848; Sat, 29 Nov 2025 14:26:03 +0100 (CET) From: Alyssa Ross To: Yureka Lilian Subject: Re: [PATCH v2 7/7] checks/integration: Adapt networking test for ipv6 In-Reply-To: <20251128223038.97536-8-yureka@cyberchaos.dev> References: <20251128223038.97536-1-yureka@cyberchaos.dev> <20251128223038.97536-8-yureka@cyberchaos.dev> Date: Sat, 29 Nov 2025 14:26:02 +0100 Message-ID: <87sedx3r85.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: RZ4RJ7LE4R4HLSKFKLJVNLAJSFLWS7FG X-Message-ID-Hash: RZ4RJ7LE4R4HLSKFKLJVNLAJSFLWS7FG X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: devel@spectrum-os.org X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Yureka Lilian writes: > Signed-off-by: Yureka Lilian > --- > release/checks/integration/default.nix | 2 +- > release/checks/integration/networking.c | 32 +++++++++++++++++++------ > 2 files changed, 26 insertions(+), 8 deletions(-) Reviewed-by: Alyssa Ross Presumably the IPv4 networking test stopped working at some point in this series though, so we should disable it there at re-enable it here so that we don't have commits that don't build. > diff --git a/release/checks/integration/networking.c b/release/checks/int= egration/networking.c > index 97d7895..6600385 100644 > --- a/release/checks/integration/networking.c > +++ b/release/checks/integration/networking.c > @@ -1,5 +1,6 @@ > // SPDX-License-Identifier: EUPL-1.2+ > // SPDX-FileCopyrightText: 2025 Alyssa Ross > +// SPDX-FileCopyrightText: 2025 Yureka Lilian >=20=20 > #include "lib.h" >=20=20 > @@ -12,21 +13,23 @@ > #include >=20=20 > #include > +#include >=20=20 > static int setup_server(void) > { > int fd; > struct ifreq ifr; > + struct in6_ifreq ifr6; >=20=20 > - struct sockaddr_in addr =3D { > - .sin_family =3D AF_INET, > - .sin_port =3D htons(1234), > - .sin_addr =3D { .s_addr =3D htonl(INADDR_LOOPBACK) }, > + struct sockaddr_in6 addr =3D { > + .sin6_family =3D AF_INET6, > + .sin6_port =3D htons(1234), > + .sin6_addr =3D { .s6_addr =3D { 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x= 00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 } }, > }; Just a thought: could we declare and fill in ifr6 here, rather than filling it in later? > sprintf(ifr.ifr_name, "lo"); >=20=20 > - if ((fd =3D socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, 0)) =3D=3D -1) { > + if ((fd =3D socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, 0)) =3D=3D -1) { > perror("socket"); > exit(EXIT_FAILURE); > } > @@ -42,11 +45,26 @@ static int setup_server(void) > exit(EXIT_FAILURE); > } >=20=20 > - if (bind(fd, &addr, sizeof addr) =3D=3D -1) { > - perror("bind"); > + ifr6.ifr6_ifindex =3D 1; > + ifr6.ifr6_addr =3D addr.sin6_addr; > + ifr6.ifr6_prefixlen =3D 128; > + if (ioctl(fd, SIOCSIFADDR, &ifr6) =3D=3D -1) { > + perror("SIOCSIFADDR"); > + exit(EXIT_FAILURE); > + } > + > + if ((fd =3D socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, 0)) =3D=3D -1) { > + perror("socket"); > exit(EXIT_FAILURE); > } >=20=20 > + int tries =3D 0; > + while (bind(fd, &addr, sizeof addr) =3D=3D -1) { > + perror("bind"); > + if (tries++ >=3D 5) > + exit(EXIT_FAILURE); > + } > + I really want to figure out why this happens, but not a blocker. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCaSr0agAKCRCZddwkt31p FZwDAQC0XSw0cvk3EIAQZXd2mmmEU3Iob6lx7cDBD/ir4UjqrQEA3qK5xHNjMb1/ xnw8ZFGxjyUTlix1pbnvJrgj6yp9FQs= =Rrg8 -----END PGP SIGNATURE----- --=-=-=--