git: dc5361ea16bf - main - rc.d/netif: Don't DAD if lo0 is the only IPv6 IF
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 18 May 2023 15:21:11 UTC
The branch main has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=dc5361ea16bf5bffab43823eb128f4081f0a5097
commit dc5361ea16bf5bffab43823eb128f4081f0a5097
Author: Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2023-05-18 03:17:24 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2023-05-18 15:20:15 +0000
rc.d/netif: Don't DAD if lo0 is the only IPv6 IF
The code in rc.d/netif waiting for IPv6 Duplicate Address Detection if
any network interfaces support IPv6. Unfortunately, since lo0 *always*
has IPv6 enabled, this means unconditionally sleeping, even on systems
which have no external IPv6 interfaces.
Since we presume that there is little risk of a duplicate address being
assigned on lo0, amend the test to wait only if there is an interface
*other than lo0* which supports IPv6.
Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D40141
---
libexec/rc/rc.d/netif | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libexec/rc/rc.d/netif b/libexec/rc/rc.d/netif
index 1a2fe0b73589..ba6b43917378 100755
--- a/libexec/rc/rc.d/netif
+++ b/libexec/rc/rc.d/netif
@@ -215,7 +215,7 @@ netif_common()
esac
if ${_func} ${ifn} $2; then
_ok="${_ok} ${ifn}"
- if ipv6if ${ifn}; then
+ if ipv6if ${ifn} && [ "${ifn}" != "lo0" ]; then
_dadwait=1
fi
else