diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2019-11-23 08:17:40 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2019-11-23 08:17:40 +0000 |
commit | 931e8c1c51bc4afb578c89320b201a9b1e0c48cc (patch) | |
tree | aa9dea13c03871b9813711276ff66788ddd37f01 /sbin | |
parent | b6e66fcc904c338cf564f92730ba3dcdd503afc9 (diff) |
On startup withdraw all proposals for all interfaces by sending an
empty proposal with if_index 0.
It is possible that the set of autoconf interfaces changed between a
stop -> start transition and slaacd would never withdraw nameservers
for interfaces that had the autoconf flag previously but no longer
after the restart.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/slaacd/slaacd.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sbin/slaacd/slaacd.c b/sbin/slaacd/slaacd.c index b137f184546..9c3f64f407d 100644 --- a/sbin/slaacd/slaacd.c +++ b/sbin/slaacd/slaacd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slaacd.c,v 1.44 2019/11/22 15:30:00 florian Exp $ */ +/* $OpenBSD: slaacd.c,v 1.45 2019/11/23 08:17:39 florian Exp $ */ /* * Copyright (c) 2017 Florian Obser <florian@openbsd.org> @@ -128,6 +128,7 @@ main(int argc, char *argv[]) int frontend_routesock, rtfilter; char *csock = SLAACD_SOCKET; #ifndef SMALL + struct imsg_propose_rdns rdns; int control_fd; #endif /* SMALL */ @@ -293,6 +294,14 @@ main(int argc, char *argv[]) main_imsg_compose_frontend(IMSG_STARTUP, 0, NULL, 0); +#ifndef SMALL + /* we are taking over, clear all previos slaac proposals */ + memset(&rdns, 0, sizeof(rdns)); + rdns.if_index = 0; + rdns.rdns_count = 0; + send_rdns_proposal(&rdns); +#endif /* SMALL */ + event_dispatch(); main_shutdown(); |