summaryrefslogtreecommitdiffstats
path: root/src/if-bsd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2018-09-26 13:27:37 +0100
committerRoy Marples <roy@marples.name>2018-09-26 13:27:37 +0100
commitd703ebf5bac2f9391aac70e407c9aa49279f55f2 (patch)
tree2154c84bb5b063d5dc54698e4f6c25776cec256f /src/if-bsd.c
parentd6d0986bdd30c3ba2959f321cbd76a8c26b9ea68 (diff)
downloaddhcpcd-d703ebf5bac2f9391aac70e407c9aa49279f55f2.tar.xz
OpenBSD: Allow dhcpcd to work alongside slaacd
Not that you should be doing this, but it appears some people want two daemons handling the RA.
Diffstat (limited to 'src/if-bsd.c')
-rw-r--r--src/if-bsd.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/if-bsd.c b/src/if-bsd.c
index cdd959a6..c1a6be86 100644
--- a/src/if-bsd.c
+++ b/src/if-bsd.c
@@ -1393,8 +1393,20 @@ set_ifxflags(int s, const struct interface *ifp)
/*
* If not doing autoconf, don't disable the kernel from doing it.
* If we need to, we should have another option actively disable it.
+ *
+ * OpenBSD moved from kernel based SLAAC to userland via slaacd(8).
+ * It has a similar featureset to dhcpcd such as stable private
+ * addresses, but lacks the ability to handle DNS inside the RA
+ * which is a serious shortfall in this day and age.
+ * Appease their user base by working alongside slaacd(8) if
+ * dhcpcd is instructed not to do auto configuration of addresses.
*/
- if (ifp->options->options & DHCPCD_IPV6RS)
+#if defined(ND6_IFF_ACCEPT_RTADV)
+#define BSD_AUTOCONF DHCPCD_IPV6RS
+#else
+#define BSD_AUTOCONF DHCPCD_IPV6RA_AUTOCONF
+#endif
+ if (ifp->options->options & BSD_AUTOCONF)
flags &= ~IFXF_AUTOCONF6;
if (ifr.ifr_flags == flags)
return 0;