Module: kamailio
Branch: master
Commit: 62d2dd6bee0a3d6a34a0f8e11f2ef260494f33e6
URL:
https://github.com/kamailio/kamailio/commit/62d2dd6bee0a3d6a34a0f8e11f2ef26…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-03-18T14:42:09+01:00
core: allow definition of advertise address for listen without port
- GH #1884
---
Modified: src/core/cfg.y
---
Diff:
https://github.com/kamailio/kamailio/commit/62d2dd6bee0a3d6a34a0f8e11f2ef26…
Patch:
https://github.com/kamailio/kamailio/commit/62d2dd6bee0a3d6a34a0f8e11f2ef26…
---
diff --git a/src/core/cfg.y b/src/core/cfg.y
index f982809207..2610364481 100644
--- a/src/core/cfg.y
+++ b/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 {