From 931e8c1c51bc4afb578c89320b201a9b1e0c48cc Mon Sep 17 00:00:00 2001 From: Florian Obser Date: Sat, 23 Nov 2019 08:17:40 +0000 Subject: 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. --- sbin/slaacd/slaacd.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sbin') 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 @@ -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(); -- cgit v1.2.3