Change in libosmo-sccp[master]: Fix (2) change in ss7 server default listen addr, keeps backward-comp...

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

pespin gerrit-no-reply at lists.osmocom.org
Tue Sep 1 11:41:01 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/19931 )


Change subject: Fix (2) change in ss7 server default listen addr, keeps backward-compatibility behavior
......................................................................

Fix (2) change in ss7 server default listen addr, keeps backward-compatibility behavior

This patch is a fixup or extension of commit
96d348efbf29888f5ef923251c7d51d45a897c0b, which only fixed the default
values for "asp" VTY node, but not for the xua server's "listen" node.
As a result, without this patch, by default the SCTP server socket will
only listen on IPv4's "0.0.0.0", since NULL is resolved by getaddrinfo
to it instead of "::" as first candidate.

Fixes: 96d348efbf29888f5ef923251c7d51d45a897c0b
Change-Id: Ifbc8df854d1f1e9b07b11911ad5da8cdf9f2080a
---
M src/osmo_ss7_vty.c
1 file changed, 7 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/31/19931/1

diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 3035844..109b94a 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -1871,8 +1871,13 @@
 	case L_CS7_XUA_NODE:
 		oxs = vty->index;
 		/* If no local addr was set, or erased after _create(): */
-		if (!oxs->cfg.local.host_cnt)
-			osmo_ss7_xua_server_set_local_host(oxs, NULL);
+		if (!oxs->cfg.local.host_cnt) {
+			/* "::" Covers both IPv4 and IPv6 */
+			if (ipv6_sctp_supported("::", true))
+				osmo_ss7_xua_server_set_local_host(oxs, "::");
+			else
+				osmo_ss7_xua_server_set_local_host(oxs, "0.0.0.0");
+		}
 		if (osmo_ss7_xua_server_bind(oxs) < 0)
 			vty_out(vty, "%% Unable to bind xUA server to IP(s)%s", VTY_NEWLINE);
 		vty->node = L_CS7_NODE;

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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ifbc8df854d1f1e9b07b11911ad5da8cdf9f2080a
Gerrit-Change-Number: 19931
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200901/35d299bc/attachment.htm>


More information about the gerrit-log mailing list