Hi, the following patch prevents rad(8) from aborting when an interface is detached (or a clone destroyed). It is no fatal condition for rad as it otherwise handles interface events just fine by reinitializing itself on interface route messages. One additional style bit included.
OK? Reyk Index: frontend.c =================================================================== RCS file: /cvs/src/usr.sbin/rad/frontend.c,v retrieving revision 1.16 diff -u -p -u -p -r1.16 frontend.c --- frontend.c 15 Aug 2018 16:48:20 -0000 1.16 +++ frontend.c 16 Nov 2018 15:22:35 -0000 @@ -648,12 +648,13 @@ leave_all_routers_mcast_group(struct ra_ log_debug("leaving multicast group on %s", ra_iface->name); all_routers.ipv6mr_interface = ra_iface->if_index; if (setsockopt(icmp6sock, IPPROTO_IPV6, IPV6_LEAVE_GROUP, - &all_routers, sizeof(all_routers)) == -1) + &all_routers, sizeof(all_routers)) == -1 && errno != ENXIO) fatal("IPV6_LEAVE_GROUP(%s)", ra_iface->name); } struct ra_iface* -find_ra_iface_by_id(uint32_t if_index) { +find_ra_iface_by_id(uint32_t if_index) +{ struct ra_iface *ra_iface; TAILQ_FOREACH(ra_iface, &ra_interfaces, entry) {