]> git.puffer.fish Git - mirror/frr.git/commitdiff
staticd: exact match on magic interface names 5302/head
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 8 Nov 2019 19:32:11 +0000 (19:32 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 8 Nov 2019 19:32:11 +0000 (19:32 +0000)
Don't do a substring match on magic interface names - do an exact match.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
staticd/static_vty.c

index f926e1d9cd2ad4f967770260046816bb178876ff..8cc4ccced1e22383a8da402e3a71e08f8032c86c 100644 (file)
@@ -426,9 +426,9 @@ static int static_route_leak(
 
        /* Null0 static route.  */
        if (ifname != NULL) {
-               if (strncasecmp(ifname, "Null0", strlen(ifname)) == 0
-                   || strncasecmp(ifname, "reject", strlen(ifname)) == 0
-                   || strncasecmp(ifname, "blackhole", strlen(ifname)) == 0) {
+               if (strcasecmp(ifname, "Null0") == 0
+                   || strcasecmp(ifname, "reject") == 0
+                   || strcasecmp(ifname, "blackhole") == 0) {
                        if (vty)
                                vty_out(vty,
                                        "%% Nexthop interface cannot be Null0, reject or blackhole\n");