Change in libosmo-sccp[master]: vty: ss7: Make sure ASP has at least INET_ANY addr set if not configu...

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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Oct 23 18:10:11 UTC 2019


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15868 )

Change subject: vty: ss7: Make sure ASP has at least INET_ANY addr set if not configured in VTY
......................................................................

vty: ss7: Make sure ASP has at least INET_ANY addr set if not configured in VTY

Several parts of the code expect an operative ASP to always have at
least one local ip addr, be it INET_ANY (NULL, 0.0.0.0) or any specific
IP address.
This allows osmo_ss7_asp_find_by_socket_addr() matching incoming
connectiongs against ASPs defined through VTY "asp" node with no
"local-ip" cmd option specified. In that case, we assume the user wants
it to bind/match against INET_ANY.

Related: OS#3608
Fixes: 80b135581909fef595d48436ab04dbcb147e3895
Change-Id: Id4da0c778890c90cf5bfcf0fd3a7ecf165f2a6df
---
M src/osmo_ss7_vty.c
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 23607ca..fa3d5d1 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -1722,6 +1722,11 @@
 	switch (vty->node) {
 	case L_CS7_ASP_NODE:
 		asp = vty->index;
+		/* If no local addr was set */
+		if (!asp->cfg.local.host_cnt) {
+			asp->cfg.local.host[0] = NULL;
+			asp->cfg.local.host_cnt = 1;
+		}
 		osmo_ss7_asp_restart(asp);
 		vty->node = L_CS7_NODE;
 		vty->index = asp->inst;

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15868
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Id4da0c778890c90cf5bfcf0fd3a7ecf165f2a6df
Gerrit-Change-Number: 15868
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191023/c93ef626/attachment.htm>


More information about the gerrit-log mailing list