Change in osmo-mgw[master]: mgcp_client: Make MGCP_CLIENT_LOCAL_ADDR_DEFAULT IPv6 compatible

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
Mon Aug 31 17:38:56 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/19920 )


Change subject: mgcp_client: Make MGCP_CLIENT_LOCAL_ADDR_DEFAULT IPv6 compatible
......................................................................

mgcp_client: Make MGCP_CLIENT_LOCAL_ADDR_DEFAULT IPv6 compatible

If "0.0.0.0", the default, is passed together with an IPv6 configured
address (ex: "mgw remote-ip ::1") in VTY, socket creation will fail due
to address version mismatch (because getaddrinfo() returns only an IPv4
address in the local result set).
If instead NULL is passed, then 2 entries are returned, one in IPv4 and
one in IPv6, and osmo_sock_init2 is smart enough to take one or another
when passed AF_UNSPEC.

Change-Id: I1be6f3b71486ce1782ba6b8c62f25145b42ec894
---
M include/osmocom/mgcp_client/mgcp_client.h
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/20/19920/1

diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h
index 8914cc2..b5a3529 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -6,7 +6,7 @@
 #include <osmocom/mgcp_client/mgcp_common.h>
 
 /* See also: RFC 3435, chapter 3.5 Transmission over UDP */
-#define MGCP_CLIENT_LOCAL_ADDR_DEFAULT "0.0.0.0"
+#define MGCP_CLIENT_LOCAL_ADDR_DEFAULT NULL /* INADDR(6)_ANY */
 #define MGCP_CLIENT_LOCAL_PORT_DEFAULT 2727
 #define MGCP_CLIENT_REMOTE_ADDR_DEFAULT "127.0.0.1"
 #define MGCP_CLIENT_REMOTE_PORT_DEFAULT 2427

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/19920
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I1be6f3b71486ce1782ba6b8c62f25145b42ec894
Gerrit-Change-Number: 19920
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/20200831/9bec4560/attachment.htm>


More information about the gerrit-log mailing list