diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-11-08 19:32:11 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-11-08 19:32:11 +0000 |
| commit | 38aac4a8fc88f7386a993446b7f46252aedb0e05 (patch) | |
| tree | 7fc4764bd5e606b4458f27fe83fbfc271126e4a3 /staticd | |
| parent | 306c4dab553443e3a3b106dd64c2f3ffcde3fbb0 (diff) | |
staticd: exact match on magic interface names
Don't do a substring match on magic interface names - do an exact match.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'staticd')
| -rw-r--r-- | staticd/static_vty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/staticd/static_vty.c b/staticd/static_vty.c index f926e1d9cd..8cc4ccced1 100644 --- a/staticd/static_vty.c +++ b/staticd/static_vty.c @@ -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"); |
