From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 81DBF1581FB for ; Wed, 28 Aug 2024 18:54:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C0604E2A04; Wed, 28 Aug 2024 18:54:26 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6B2C2E2A04 for ; Wed, 28 Aug 2024 18:54:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6937F341214 for ; Wed, 28 Aug 2024 18:54:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C818A11CF for ; Wed, 28 Aug 2024 18:54:23 +0000 (UTC) From: "Patrick McLean" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick McLean" Message-ID: <1724871245.e04d54da670198ce0aff2fe1577fbd3c44b15c26.chutzpah@OpenRC> Subject: [gentoo-commits] proj/netifrc:master commit in: net/ X-VCS-Repository: proj/netifrc X-VCS-Files: net/bonding.sh net/bridge.sh X-VCS-Directories: net/ X-VCS-Committer: chutzpah X-VCS-Committer-Name: Patrick McLean X-VCS-Revision: e04d54da670198ce0aff2fe1577fbd3c44b15c26 X-VCS-Branch: master Date: Wed, 28 Aug 2024 18:54:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: addf4671-27e9-4124-a471-79e57a8e63c0 X-Archives-Hash: 96dcc717d7e815510fa00203f8019044 commit: e04d54da670198ce0aff2fe1577fbd3c44b15c26 Author: Patrick McLean gentoo org> AuthorDate: Wed Aug 28 18:51:30 2024 +0000 Commit: Patrick McLean gentoo org> CommitDate: Wed Aug 28 18:54:05 2024 +0000 URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=e04d54da Disable IPv6 on subdevices for bonding and bridges Rather than shelling out to the `sysctl` command like the PR does, let's write directly to `/proc/sys` after checking that it exists. This likely needs work to do the same thing on BSD. Closes: https://bugs.gentoo.org/515640 Closes: https://github.com/gentoo/netifrc/pull/55 Signed-off-by: Patrick McLean gentoo.org> net/bonding.sh | 2 ++ net/bridge.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/net/bonding.sh b/net/bonding.sh index e3fcaa7..bb8b061 100644 --- a/net/bonding.sh +++ b/net/bonding.sh @@ -133,6 +133,8 @@ bonding_pre_start() for IFACE in ${slaves}; do _delete_addresses _down + local disable_ipv6="/proc/sys/net/ipv6/conf/${IFACE}/disable_ipv6" + [ -f "${disable_ipv6}" ] && printf '1\n' > "${disable_ipv6}" done fi ) diff --git a/net/bridge.sh b/net/bridge.sh index a380f6a..cea8a49 100644 --- a/net/bridge.sh +++ b/net/bridge.sh @@ -152,6 +152,8 @@ bridge_pre_start() return 1 fi # The interface is known to exist now + local disable_ipv6="/proc/sys/net/ipv6/conf/${IFACE}/disable_ipv6" + [ -f "${disable_ipv6}" ] && printf '1\n' > "${disable_ipv6}" _up if ${do_iproute2}; then _netns ip link set "${x}" master "${BR_IFACE}"