ospf6d mostly only cares about AF_INET6 routes
authorbenno <benno@openbsd.org>
Thu, 8 Feb 2018 21:37:36 +0000 (21:37 +0000)
committerbenno <benno@openbsd.org>
Thu, 8 Feb 2018 21:37:36 +0000 (21:37 +0000)
found while investigating routing socket desync with claudio.
ok remi jca claudio

usr.sbin/ospf6d/kroute.c

index 58e4f72..4281818 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: kroute.c,v 1.53 2017/11/05 14:33:27 jca Exp $ */
+/*     $OpenBSD: kroute.c,v 1.54 2018/02/08 21:37:36 benno Exp $ */
 
 /*
  * Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -102,7 +102,7 @@ kr_init(int fs)
        kr_state.fib_sync = fs;
 
        if ((kr_state.fd = socket(AF_ROUTE,
-           SOCK_RAW | SOCK_CLOEXEC | SOCK_NONBLOCK, 0)) == -1) {
+           SOCK_RAW | SOCK_CLOEXEC | SOCK_NONBLOCK, AF_INET6)) == -1) {
                log_warn("kr_init: socket");
                return (-1);
        }