summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-01-08 10:55:45 +0000
committermpi <mpi@openbsd.org>2015-01-08 10:55:45 +0000
commit2c6d939c0d842b76397ea6eb88a8a9c767fb4e88 (patch)
tree3f97ec338faafd4769939bab2303fb63004ae192
parentreorder hostbased key attempts to better match the default (diff)
downloadwireguard-openbsd-2c6d939c0d842b76397ea6eb88a8a9c767fb4e88.tar.xz
wireguard-openbsd-2c6d939c0d842b76397ea6eb88a8a9c767fb4e88.zip
Do not unconditionally set a link-local address.
carp(4) has a hack to update its Ethernet address which was also generating the corresponding IPv6 link-local address. Since the removal of the NOINET6 flag, this link-local address was generated even if no IPv6 address has been configured on the interface. This unbreak carp setup without v6 addresses, found the hard way by sebastia@. ok sebastia@, benno@, stsp@, @phessler
-rw-r--r--sys/netinet/ip_carp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 92d822270ca..3f93c7ec051 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.243 2014/12/19 17:14:40 tedu Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.244 2015/01/08 10:55:45 mpi Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -1785,7 +1785,8 @@ carp_set_enaddr(struct carp_softc *sc)
* (re)attach a link-local address which matches
* our new MAC address.
*/
- in6_ifattach_linklocal(&sc->sc_if, NULL);
+ if (sc->sc_naddrs6)
+ in6_ifattach_linklocal(&sc->sc_if, NULL);
#endif
carp_set_state_all(sc, INIT);
carp_setrun_all(sc, 0);