diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/slaacd/engine.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.sbin/slaacd/engine.c b/usr.sbin/slaacd/engine.c index 6ecd6cb2f0e..c43bfc4c708 100644 --- a/usr.sbin/slaacd/engine.c +++ b/usr.sbin/slaacd/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.36 2017/05/31 07:14:58 florian Exp $ */ +/* $OpenBSD: engine.c,v 1.37 2017/05/31 07:30:32 florian Exp $ */ /* * Copyright (c) 2017 Florian Obser <florian@openbsd.org> @@ -847,6 +847,8 @@ remove_slaacd_iface(uint32_t if_index) { struct slaacd_iface *iface, *tiface; struct radv *ra; + struct address_proposal *addr_proposal; + struct dfr_proposal *dfr_proposal; LIST_FOREACH_SAFE (iface, &slaacd_interfaces, entries, tiface) { if (iface->if_index == if_index) { @@ -856,6 +858,19 @@ remove_slaacd_iface(uint32_t if_index) LIST_REMOVE(ra, entries); free_ra(ra); } + /* XXX inform netcfgd? */ + while(!LIST_EMPTY(&iface->addr_proposals)) { + addr_proposal = + LIST_FIRST(&iface->addr_proposals); + LIST_REMOVE(addr_proposal, entries); + free(addr_proposal); + } + while(!LIST_EMPTY(&iface->dfr_proposals)) { + dfr_proposal = + LIST_FIRST(&iface->dfr_proposals); + LIST_REMOVE(dfr_proposal, entries); + free(dfr_proposal); + } free(iface); break; } |