rtadvd is only interested in IPv6 so limit route socket to AF_INET6.
authorclaudio <claudio@openbsd.org>
Mon, 16 Jul 2018 07:56:04 +0000 (07:56 +0000)
committerclaudio <claudio@openbsd.org>
Mon, 16 Jul 2018 07:56:04 +0000 (07:56 +0000)
OK florian@

usr.sbin/rtadvd/rtadvd.c

index aeef7da..ba15e31 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: rtadvd.c,v 1.91 2017/08/22 01:44:09 jca Exp $ */
+/*     $OpenBSD: rtadvd.c,v 1.92 2018/07/16 07:56:04 claudio Exp $     */
 /*     $KAME: rtadvd.c,v 1.66 2002/05/29 14:18:36 itojun Exp $ */
 
 /*
@@ -1159,7 +1159,7 @@ rtsock_open(void)
 {
        unsigned int rtfilter;
 
-       if ((rtsock = socket(PF_ROUTE, SOCK_RAW, 0)) < 0)
+       if ((rtsock = socket(PF_ROUTE, SOCK_RAW, AF_INET6)) < 0)
                fatal("socket");
 
        rtfilter =