Change in osmo-mgw[master]: mgcp_client: Allow setting IPv6 addresses

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 16:04:11 UTC 2020


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


Change subject: mgcp_client: Allow setting IPv6 addresses
......................................................................

mgcp_client: Allow setting IPv6 addresses

Change-Id: I257218b2ad7cbdd0ac4ae7fa75802bed74ce983f
---
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp-client/mgcp_client_vty.c
2 files changed, 13 insertions(+), 9 deletions(-)



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

diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index df84226..72068b4 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -794,7 +794,7 @@
 
 		/* Initalize socket with the currently configured port
 		 * number */
-		rc = osmo_sock_init2_ofd(&wq->bfd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, mgcp->actual.local_addr,
+		rc = osmo_sock_init2_ofd(&wq->bfd, AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP, mgcp->actual.local_addr,
 					 mgcp->actual.local_port, mgcp->actual.remote_addr, mgcp->actual.remote_port,
 					 OSMO_SOCK_F_BIND | OSMO_SOCK_F_CONNECT);
 		if (rc > 0)
diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c
index d4e78f1..9c60ed9 100644
--- a/src/libosmo-mgcp-client/mgcp_client_vty.c
+++ b/src/libosmo-mgcp-client/mgcp_client_vty.c
@@ -36,9 +36,10 @@
 struct mgcp_client_conf *global_mgcp_client_conf = NULL;
 
 DEFUN(cfg_mgw_local_ip, cfg_mgw_local_ip_cmd,
-      "mgw local-ip A.B.C.D",
+      "mgw local-ip " VTY_IPV46_CMD,
       MGW_STR "local bind to connect to MGW from\n"
-      "local bind IP address\n")
+      "local bind IPv4 address\n"
+      "local bind IPv6 address\n")
 {
 	if (!global_mgcp_client_conf)
 		return CMD_ERR_NOTHING_TODO;
@@ -49,9 +50,10 @@
 	return CMD_SUCCESS;
 }
 ALIAS_DEPRECATED(cfg_mgw_local_ip, cfg_mgcpgw_local_ip_cmd,
-		 "mgcpgw local-ip A.B.C.D",
+		 "mgcpgw local-ip " VTY_IPV46_CMD,
 		 MGW_STR "local bind to connect to MGCP gateway with\n"
-		 "local bind IP address\n")
+		 "local bind IPv4 address\n"
+		 "local bind IPv6 address\n")
 
 DEFUN(cfg_mgw_local_port, cfg_mgw_local_port_cmd,
       "mgw local-port <0-65535>",
@@ -69,9 +71,10 @@
 		 "local bind port\n")
 
 DEFUN(cfg_mgw_remote_ip, cfg_mgw_remote_ip_cmd,
-      "mgw remote-ip A.B.C.D",
+      "mgw remote-ip " VTY_IPV46_CMD,
       MGW_STR "remote IP address to reach the MGW at\n"
-      "remote IP address\n")
+      "remote IPv4 address\n"
+      "remote IPv6 address\n")
 {
 	if (!global_mgcp_client_conf)
 		return CMD_ERR_NOTHING_TODO;
@@ -82,9 +85,10 @@
 	return CMD_SUCCESS;
 }
 ALIAS_DEPRECATED(cfg_mgw_remote_ip, cfg_mgcpgw_remote_ip_cmd,
-		 "mgcpgw remote-ip A.B.C.D",
+		 "mgcpgw remote-ip " VTY_IPV46_CMD,
 		 MGW_STR "remote bind to connect to MGCP gateway with\n"
-		 "remote bind IP address\n")
+		 "remote bind IPv4 address\n"
+		 "remote bind IPv6 address\n")
 
 DEFUN(cfg_mgw_remote_port, cfg_mgw_remote_port_cmd,
       "mgw remote-port <0-65535>",

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I257218b2ad7cbdd0ac4ae7fa75802bed74ce983f
Gerrit-Change-Number: 19916
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/3a55f4c0/attachment.htm>


More information about the gerrit-log mailing list