aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-10-20 18:47:33 +0200
committerHarald Welte <laforge@osmocom.org>2019-10-20 18:55:55 +0200
commit89407619a31a4332bdb59e7921b99a29b7d6e00c (patch)
tree7dcad3eafd66e2d16c25bf85f7a53f961fc93c60
parentecb2cf1a312230def1b2b4ed4b9bd4ea499cf48a (diff)
Don't permit routing-context != 0 for IPA peers
The IPA protocol doesn't have the context of routing-keys. We are only permitting routing key '0' (as the default routing key) when configuring via VTY. Change-Id: I3f166f44903d0b93963cc5d0cca73d277d2b7215 Fixes: OS#4234, OS#4233
-rw-r--r--src/osmo_ss7_vty.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 35ee5cd..ec387a9 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -864,6 +864,12 @@ static int _rout_key(struct vty *vty,
struct osmo_ss7_routing_key *rkey = &as->cfg.routing_key;
int pc;
+ if (as->cfg.proto == OSMO_SS7_ASP_PROT_IPA && atoi(rcontext) != 0) {
+ vty_out(vty, "IPA doesn't suppor routing contexts; only permitted routing context "
+ "is 0\n");
+ return CMD_WARNING;
+ }
+
pc = osmo_ss7_pointcode_parse(as->inst, dpc);
if (pc < 0) {
vty_out(vty, "Invalid point code (%s)%s", dpc, VTY_NEWLINE);