Rationalise join_multicast()
diff --git a/src/dnsmasq.c b/src/dnsmasq.c
index 4c7cd39..17dffa4 100644
--- a/src/dnsmasq.c
+++ b/src/dnsmasq.c
@@ -220,12 +220,6 @@
die(_("cannot set --bind-interfaces and --bind-dynamic"), NULL, EC_BADCONF);
#endif
-#ifdef HAVE_DHCP6
- /* after netlink_init */
- if (daemon->doing_dhcp6 || daemon->doing_ra)
- join_multicast();
-#endif
-
if (!enumerate_interfaces())
die(_("failed to find list of interfaces: %s"), NULL, EC_MISC);
@@ -255,6 +249,12 @@
}
else
create_wildcard_listeners();
+
+#ifdef HAVE_DHCP6
+ /* after enumerate_interfaces() */
+ if (daemon->doing_dhcp6 || daemon->doing_ra)
+ join_multicast(1);
+#endif
if (daemon->port != 0)
cache_init();