From: Quentin Young Date: Sun, 2 Apr 2017 23:21:09 +0000 (+0000) Subject: lib: fix proto_redistnum() oversight from #257 X-Git-Tag: frr-3.1-dev~13^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f257ff2cdb28303b3c1d8135bc9897f62adae4f2;p=matthieu%2Ffrr.git lib: fix proto_redistnum() oversight from #257 proto_redistnum() now accepts full protocol strings and not partial names per #10 Signed-off-by: Quentin Young --- diff --git a/lib/log.c b/lib/log.c index 69225dbf7a..c7d4ca2d97 100644 --- a/lib/log.c +++ b/lib/log.c @@ -1059,7 +1059,7 @@ proto_redistnum(int afi, const char *s) return ZEBRA_ROUTE_VNC; else if (strmatch (s, "vnc-direct")) return ZEBRA_ROUTE_VNC_DIRECT; - else if (strncmp (s, "n", 1) == 0) + else if (strmatch (s, "nhrp")) return ZEBRA_ROUTE_NHRP; } if (afi == AFI_IP6) @@ -1084,7 +1084,7 @@ proto_redistnum(int afi, const char *s) return ZEBRA_ROUTE_VNC; else if (strmatch (s, "vnc-direct")) return ZEBRA_ROUTE_VNC_DIRECT; - else if (strncmp (s, "n", 1) == 0) + else if (strmatch (s, "nhrp")) return ZEBRA_ROUTE_NHRP; } return -1;