[MERGED] osmo-ggsn[master]: sgsnemu: listen param is a host, not an interface

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Feb 14 00:43:23 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: sgsnemu: listen param is a host, not an interface
......................................................................


sgsnemu: listen param is a host, not an interface

This param is parsed by gethostbyname() and it's confusing to document
it as an interface, because users will then attempt to pass "lo" to it,
which fails.

Change-Id: Id8ef0e12ddcaf8bfd199a44de0ba4280f05d4431
---
M sgsnemu/cmdline.c
M sgsnemu/cmdline.ggo
M sgsnemu/cmdline.h
3 files changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/sgsnemu/cmdline.c b/sgsnemu/cmdline.c
index 412e484..b062533 100644
--- a/sgsnemu/cmdline.c
+++ b/sgsnemu/cmdline.c
@@ -41,7 +41,7 @@
 	"      --pidfile=STRING          Filename of process id file\n                                  (default=`./sgsnemu.pid')",
 	"      --statedir=STRING         Directory of nonvolatile data  (default=`./')",
 	"      --dns=STRING              DNS Server to use",
-	"  -l, --listen=STRING           Local interface",
+	"  -l, --listen=STRING           Local host",
 	"  -r, --remote=STRING           Remote host",
 	"      --contexts=INT            Number of contexts  (default=`1')",
 	"      --timelimit=INT           Exit after timelimit seconds  (default=`0')",
@@ -1003,7 +1003,7 @@
 				goto failure;
 
 			break;
-		case 'l':	/* Local interface.  */
+		case 'l':	/* Local host.  */
 
 			if (update_arg((void *)&(args_info->listen_arg),
 				       &(args_info->listen_orig),
diff --git a/sgsnemu/cmdline.ggo b/sgsnemu/cmdline.ggo
index dec19cd..0f415f5 100644
--- a/sgsnemu/cmdline.ggo
+++ b/sgsnemu/cmdline.ggo
@@ -26,7 +26,7 @@
 option  "statedir"     - "Directory of nonvolatile data"  string default="./" no
 
 option  "dns"          - "DNS Server to use"              string no
-option  "listen"       l "Local interface"                string no
+option  "listen"       l "Local host"                     string no
 option  "remote"       r "Remote host"                    string no
 
 option  "contexts"     - "Number of contexts"             int    default="1" no
diff --git a/sgsnemu/cmdline.h b/sgsnemu/cmdline.h
index 31a2085..24f772b 100644
--- a/sgsnemu/cmdline.h
+++ b/sgsnemu/cmdline.h
@@ -69,11 +69,11 @@
 		const char *dns_help;
 			/**< @brief DNS Server to use help description.  */
 		char *listen_arg;
-			/**< @brief Local interface.  */
+			/**< @brief Local host.  */
 		char *listen_orig;
-			/**< @brief Local interface original value given at command line.  */
+			/**< @brief Local host original value given at command line.  */
 		const char *listen_help;
-			   /**< @brief Local interface help description.  */
+			   /**< @brief Local host help description.  */
 		char *remote_arg;
 			/**< @brief Remote host.  */
 		char *remote_orig;

-- 
To view, visit https://gerrit.osmocom.org/6391
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8ef0e12ddcaf8bfd199a44de0ba4280f05d4431
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list