From 89407619a31a4332bdb59e7921b99a29b7d6e00c Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 20 Oct 2019 18:47:33 +0200 Subject: 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 --- src/osmo_ss7_vty.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3