summaryrefslogtreecommitdiff
path: root/sbin/slaacd/frontend.c
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2020-11-28 07:59:27 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2020-11-28 07:59:27 +0000
commit2f727ffafdc41f7e2edf413bbed4795140278318 (patch)
treeba436d39ec3c452d2f73f19c4fcd538f8ad5e514 /sbin/slaacd/frontend.c
parent3ad70640aadeb874066f6435643d564f8e318bb7 (diff)
An interface might have disappeared or switched rdomains while we
waited for a FD. It's not a fatal condition if it arrives late. OK tb
Diffstat (limited to 'sbin/slaacd/frontend.c')
-rw-r--r--sbin/slaacd/frontend.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sbin/slaacd/frontend.c b/sbin/slaacd/frontend.c
index f14331eee72..6cae8c9ca05 100644
--- a/sbin/slaacd/frontend.c
+++ b/sbin/slaacd/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.38 2020/11/28 07:58:50 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.39 2020/11/28 07:59:26 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -1164,9 +1164,14 @@ set_icmp6sock(int icmp6sock, int rdomain)
}
}
- if (icmp6sock != -1)
- fatalx("received unneeded ICMPv6 socket for rdomain %d",
- rdomain);
+ if (icmp6sock != -1) {
+ /*
+ * The interface disappeared or changed rdomain while we were
+ * waiting for the parent process to open the raw socket.
+ */
+ close(icmp6sock);
+ return;
+ }
LIST_FOREACH (iface, &interfaces, entries) {
if (event_initialized(&iface->icmp6ev->ev) &&