This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/10557 )
Change subject: interpret domain '*' as 'allow any domain'
......................................................................
interpret domain '*' as 'allow any domain'
Make the 'domain NAME' vty doc more descriptive, and add the hint that '*'
means any domain.
In check_domain_name(), exit early in success if the configured domain name is
'*'.
(Do not implement other wildcard functionality for partial matches or the
like, just the single '*'.)
Related: OS#3490
Change-Id: Ie0220c88d2f5cee15f2a90390b3c4590ac61d5eb
---
M src/libosmo-mgcp/mgcp_msg.c
M src/libosmo-mgcp/mgcp_vty.c
2 files changed, 7 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
Stefan Sperling: Looks good to me, but someone else must approve
Neels Hofmeyr: Looks good to me, approved
diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c
index 7378ddc..a89c579 100644
--- a/src/libosmo-mgcp/mgcp_msg.c
+++ b/src/libosmo-mgcp/mgcp_msg.c
@@ -219,6 +219,10 @@
if (!domain_to_check)
return -EINVAL;
+ /* Accept any domain if configured as "*" */
+ if (!strcmp(cfg->domain, "*"))
+ return 0;
+
if (strcmp(domain_to_check+1, cfg->domain) != 0)
return -EINVAL;
diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c
index ad462b7..00af3bd 100644
--- a/src/libosmo-mgcp/mgcp_vty.c
+++ b/src/libosmo-mgcp/mgcp_vty.c
@@ -1208,7 +1208,9 @@
DEFUN(cfg_mgcp_domain,
cfg_mgcp_domain_cmd,
- "domain NAME", "domain\n" "qualified domain name\n")
+ "domain NAME",
+ "Set the domain part expected in MGCP messages' endpoint names\n"
+ "Qualified domain name expected in MGCP endpoint names, or '*' to accept any domain\n")
{
osmo_strlcpy(g_cfg->domain, argv[0], sizeof(g_cfg->domain));
return CMD_SUCCESS;
--
To view, visit https://gerrit.osmocom.org/10557
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0220c88d2f5cee15f2a90390b3c4590ac61d5eb
Gerrit-Change-Number: 10557
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Stefan Sperling <ssperling at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180821/c3a83dae/attachment.htm>