pespin submitted this change.
vty: Fix wrong return check in routing-key command
The function ss7_as_routing_key_create_route() returns a route pointer,
not a return code.
Related: Coverity CID#565013
Change-Id: I39a8f11a9c39819c8bf180a69cc7cb26b0fb21f4
---
M src/ss7_as_vty.c
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ss7_as_vty.c b/src/ss7_as_vty.c
index 6197093..ff533bb 100644
--- a/src/ss7_as_vty.c
+++ b/src/ss7_as_vty.c
@@ -461,7 +461,7 @@
rkey->ssn = ssn;
/* Add fully qualified route for routing-key: */
- if (ss7_as_routing_key_create_route(as) < 0) {
+ if (!ss7_as_routing_key_create_route(as)) {
vty_out(vty, "Failed adding dynamic match-routing-key route for AS %s!%s",
as->cfg.name, VTY_NEWLINE);
return CMD_WARNING;
To view, visit change 43950. To unsubscribe, or for help writing mail filters, visit settings.