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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gbproxy/+/22808 )
Change subject: gbproxy_vty: Fix NRI overlap behaviour to match osmo-bsc
......................................................................
gbproxy_vty: Fix NRI overlap behaviour to match osmo-bsc
The MSC-pooling chapter in OsmoBSC mentions that overlapping NRI ranges will
warn if configured though the VTY interface, but fail when started with
such a config.
The manual for OsmoGbProxy promises a similar behaviour, this patch implements
it.
Change-Id: Id3815ed8d1736ea3ba1e498b2bc3cf30b772551d
---
M src/gb_proxy_vty.c
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/gb_proxy_vty.c b/src/gb_proxy_vty.c
index 9240d2d..f069e88 100644
--- a/src/gb_proxy_vty.c
+++ b/src/gb_proxy_vty.c
@@ -283,6 +283,7 @@
struct gbproxy_sgsn *sgsn = vty->index;
struct gbproxy_sgsn *other_sgsn;
bool before;
+ bool overlaps = false;
int rc;
const char *message;
struct osmo_nri_range add_range;
@@ -307,13 +308,17 @@
if (osmo_nri_range_overlaps_ranges(&add_range, other_sgsn->pool.nri_ranges)) {
uint16_t nsei = sgsn->nse->nsei;
uint16_t other_nsei = other_sgsn->nse->nsei;
+ overlaps = true;
NRI_WARN(sgsn, "NRI range [%d..%d] overlaps between NSE %05d and NSE %05d."
" For overlaps, NSE %05d has higher priority than NSE %05d",
add_range.first, add_range.last, nsei, other_nsei,
before ? other_nsei : nsei, before ? nsei : other_nsei);
}
}
- return CMD_SUCCESS;
+ if (overlaps)
+ return CMD_WARNING;
+ else
+ return CMD_SUCCESS;
}
DEFUN_ATTR(cfg_sgsn_nri_del, cfg_sgsn_nri_del_cmd,
--
To view, visit https://gerrit.osmocom.org/c/osmo-gbproxy/+/22808
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: Id3815ed8d1736ea3ba1e498b2bc3cf30b772551d
Gerrit-Change-Number: 22808
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210210/42c76eb4/attachment.htm>