From f1bb088307d7dd18de4e1740a27e9e53423efddb Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 30 May 2017 08:58:34 +0000 Subject: [PATCH] Enable slaacd(8) by default and disable router solicitation and advertisement processing in the kernel. Go for it!!! deraadt@ additional encouragement to push forward from at least mpi and henning special thanks to naddy for being an early adopter and finding bugs. --- etc/rc.conf | 4 ++-- sys/netinet6/nd6_rtr.c | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/etc/rc.conf b/etc/rc.conf index 6555d769c04..c303e364fa4 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -1,4 +1,4 @@ -# $OpenBSD: rc.conf,v 1.214 2017/05/29 10:24:06 florian Exp $ +# $OpenBSD: rc.conf,v 1.215 2017/05/30 08:58:34 florian Exp $ # DO NOT EDIT THIS FILE!! # @@ -57,7 +57,7 @@ rtadvd_flags=NO # for normal use: list of interfaces # be sure to set net.inet6.ip6.forwarding=1 sasyncd_flags=NO sensorsd_flags=NO -slaacd_flags=NO +slaacd_flags= slowcgi_flags=NO smtpd_flags= sndiod_flags= diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 7fc1e36e0ec..099a9e21904 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6_rtr.c,v 1.158 2017/05/16 12:24:04 mpi Exp $ */ +/* $OpenBSD: nd6_rtr.c,v 1.159 2017/05/30 08:58:34 florian Exp $ */ /* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */ /* @@ -282,6 +282,9 @@ nd6_rs_output(struct ifnet* ifp, struct in6_ifaddr *ia6) void nd6_rs_output_set_timo(int timeout) { +#ifndef SMALL_KERNEL + return; +#endif /* SMALL_KERNEL */ nd6_rs_output_timeout = timeout; timeout_add_sec(&nd6_rs_output_timer, nd6_rs_output_timeout); } @@ -381,6 +384,10 @@ nd6_ra_input(struct mbuf *m, int off, int icmp6len) if (ifp == NULL) goto freeit; +#ifndef SMALL_KERNEL + goto freeit; +#endif /* SMALL_KERNEL */ + /* We accept RAs only if inet6 autoconf is enabled */ if (!(ifp->if_xflags & IFXF_AUTOCONF6)) goto freeit; -- 2.20.1