ospfd: fix argument parsing for distribute-list
Use the correct argument for the protocol lookup in
ospf distribute-list commands.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 3655cfe..862ef95 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -6042,7 +6042,7 @@
int source;
/* Get distribute source. */
- source = proto_redistnum(AFI_IP, argv[0]);
+ source = proto_redistnum(AFI_IP, argv[1]);
if (source < 0 || source == ZEBRA_ROUTE_OSPF)
return CMD_WARNING;
@@ -6061,7 +6061,7 @@
struct ospf *ospf = vty->index;
int source;
- source = proto_redistnum(AFI_IP, argv[0]);
+ source = proto_redistnum(AFI_IP, argv[1]);
if (source < 0 || source == ZEBRA_ROUTE_OSPF)
return CMD_WARNING;