Module: kamailio
Branch: master
Commit: c2e8baad3b39b2e5871c0cdc796b3be48462c2a9
URL:
https://github.com/kamailio/kamailio/commit/c2e8baad3b39b2e5871c0cdc796b3be…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-10-20T14:51:17+02:00
core: allow proto in advertise for a couple of listen variants
---
Modified: src/core/cfg.y
---
Diff:
https://github.com/kamailio/kamailio/commit/c2e8baad3b39b2e5871c0cdc796b3be…
Patch:
https://github.com/kamailio/kamailio/commit/c2e8baad3b39b2e5871c0cdc796b3be…
---
diff --git a/src/core/cfg.y b/src/core/cfg.y
index c8ca68f4cca..98effbd9b75 100644
--- a/src/core/cfg.y
+++ b/src/core/cfg.y
@@ -1665,6 +1665,19 @@ assign_stm:
}
free_socket_id_lst($3);
}
+ | LISTEN EQUAL id_lst ADVERTISE proto COLON listen_id COLON NUMBER {
+ 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, $7, $9,
+ lst_tmp->flags)!=0) {
+ LM_CRIT("cfg. parser: failed to add listen address\n");
+ break;
+ }
+ }
+ free_socket_id_lst($3);
+ }
| LISTEN EQUAL id_lst ADVERTISE listen_id COLON NUMBER VIRTUAL {
for(lst_tmp=$3; lst_tmp; lst_tmp=lst_tmp->next) {
lst_tmp->flags |= SI_IS_VIRTUAL;
@@ -1692,6 +1705,19 @@ assign_stm:
}
free_socket_id_lst($3);
}
+ | LISTEN EQUAL id_lst ADVERTISE proto COLON listen_id COLON NUMBER STRNAME STRING {
+ for(lst_tmp=$3; lst_tmp; lst_tmp=lst_tmp->next) {
+ if (add_listen_advertise_iface_name(lst_tmp->addr_lst->name,
+ lst_tmp->addr_lst->next,
+ lst_tmp->port, lst_tmp->proto,
+ $5, $7, $9, $11,
+ lst_tmp->flags)!=0) {
+ LM_CRIT("cfg. parser: failed to add listen address\n");
+ break;
+ }
+ }
+ free_socket_id_lst($3);
+ }
| LISTEN EQUAL id_lst ADVERTISE listen_id COLON NUMBER STRNAME STRING VIRTUAL {
for(lst_tmp=$3; lst_tmp; lst_tmp=lst_tmp->next) {
lst_tmp->flags |= SI_IS_VIRTUAL;
@@ -1706,6 +1732,20 @@ assign_stm:
}
free_socket_id_lst($3);
}
+ | LISTEN EQUAL id_lst ADVERTISE proto COLON listen_id COLON NUMBER STRNAME STRING
VIRTUAL {
+ for(lst_tmp=$3; lst_tmp; lst_tmp=lst_tmp->next) {
+ lst_tmp->flags |= SI_IS_VIRTUAL;
+ if
(add_listen_advertise_iface_name(lst_tmp->addr_lst->name,
+
lst_tmp->addr_lst->next,
+ lst_tmp->port,
lst_tmp->proto,
+ $5, $7, $9, $11,
+
lst_tmp->flags)!=0) {
+ LM_CRIT("cfg. parser: failed to add listen
address\n");
+ break;
+ }
+ }
+ 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,