2
0
Эх сурвалжийг харах

core: allow definition of advertise address for listen without port

- GH #1884
Daniel-Constantin Mierla 6 жил өмнө
parent
commit
62d2dd6bee
1 өөрчлөгдсөн 13 нэмэгдсэн , 0 устгасан
  1. 13 0
      src/core/cfg.y

+ 13 - 0
src/core/cfg.y

@@ -1448,6 +1448,19 @@ assign_stm:
 		}
 		free_socket_id_lst($3);
 	}
+	| LISTEN EQUAL id_lst ADVERTISE listen_id {
+		for(lst_tmp=$3; lst_tmp; lst_tmp=lst_tmp->next) {
+			if (add_listen_advertise_iface(	lst_tmp->addr_lst->name,
+									lst_tmp->addr_lst->next,
+									lst_tmp->port, lst_tmp->proto,
+									$5, 0,
+									lst_tmp->flags)!=0) {
+				LM_CRIT("cfg. parser: failed to add listen address\n");
+				break;
+			}
+		}
+		free_socket_id_lst($3);
+	}
 	| LISTEN EQUAL  error { yyerror("ip address, interface name or"
 									" hostname expected"); }
 	| ALIAS EQUAL  id_lst {