Fix listener address for Port blocks with no host listed.
[ircu2.10.12-pk.git] / ircd / ircd_parser.y
index 67fddfcc6a43f3c3fedab746193972cac908f7b0..d75d32f9f7c25fb9ba0339aa3a9f645a5ce6d668 100644 (file)
@@ -698,6 +698,14 @@ address_family:
 portblock: PORT '{' portitems '}' ';' {
   struct ListenerFlags flags_here;
   struct SLink *link;
+  if (hosts == NULL) {
+    struct SLink *link;
+    link = make_link();
+    DupString(link->value.cp, "*");
+    link->flags = 0;
+    link->next = hosts;
+    hosts = link;
+  }
   for (link = hosts; link != NULL; link = link->next) {
     memcpy(&flags_here, &listen_flags, sizeof(&flags_here));
     switch (link->flags & (USE_IPV4 | USE_IPV6)) {