aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-03-27 19:03:30 +0100
committerHarald Welte <laforge@osmocom.org>2021-03-27 19:03:30 +0100
commit5379273ea32eae56b1cdd263ec66f29187a4361c (patch)
tree3f94e350dee987dded3a3bb242bd29131e69c115
parentecef920b8facd61438c8b4d3a288111186b0c1a6 (diff)
vty: Inform user that static IP addresses are not supported
Currently, osmo-ggsn doesn't implement PDP contexts with static IP addresses. The code for specifying ranges that can be used for static IPs was always present even from OpenGGSN days, but we never really treated them. Let's not raise the impression we do by warning accordingly if the user configures them. Change-Id: I7787dae037c46c0c5052aa6dd000be330984f144 Related: OS#5097
-rw-r--r--ggsn/ggsn_vty.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c
index 71d8ff6..1738e70 100644
--- a/ggsn/ggsn_vty.c
+++ b/ggsn/ggsn_vty.c
@@ -533,9 +533,11 @@ DEFUN(cfg_apn_ip_prefix, cfg_apn_ip_prefix_cmd,
struct in46_prefix *pfx;
/* first update our parsed prefix */
- if (!strcmp(argv[0], "static"))
+ if (!strcmp(argv[0], "static")) {
pfx = &apn->v4.cfg.static_prefix;
- else
+ vty_out(vty, "%% static IP addresses currently not yet supported%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ } else
pfx = &apn->v4.cfg.dynamic_prefix;
str2prefix(pfx, argv[1]);
@@ -567,9 +569,11 @@ DEFUN(cfg_apn_ipv6_prefix, cfg_apn_ipv6_prefix_cmd,
struct apn_ctx *apn = (struct apn_ctx *) vty->index;
struct in46_prefix *pfx;
- if (!strcmp(argv[0], "static"))
+ if (!strcmp(argv[0], "static")) {
pfx = &apn->v6.cfg.static_prefix;
- else
+ vty_out(vty, "%% static IP addresses currently not yet supported%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ } else
pfx = &apn->v6.cfg.dynamic_prefix;
str2prefix(pfx, argv[1]);
return CMD_SUCCESS;