From: Donald Sharp Date: Thu, 28 Apr 2016 14:02:35 +0000 (-0400) Subject: lib: VRF_GET_ID should respect VRF_UNKNOWN X-Git-Tag: frr-2.0-rc1~947 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=6f16f5a01976f16ee0676b2435fc24382bcc29e9;p=matthieu%2Ffrr.git lib: VRF_GET_ID should respect VRF_UNKNOWN The VRF_GET_ID macro should respect the VRF_UNKNOWN as a notice that the vrf is not active. Signed-off-by: Don Slice Reviewed-by: Donald Sharp --- diff --git a/lib/vrf.h b/lib/vrf.h index b81873b0ff..dcc115563d 100644 --- a/lib/vrf.h +++ b/lib/vrf.h @@ -123,7 +123,7 @@ extern vrf_id_t vrf_name_to_id (const char *); vty_out (vty, "%% VRF %s not found%s", NAME, VTY_NEWLINE);\ return CMD_WARNING; \ } \ - if (!vrf->vrf_id) \ + if (vrf->vrf_id == VRF_UNKNOWN) \ { \ vty_out (vty, "%% VRF %s not active%s", NAME, VTY_NEWLINE);\ return CMD_WARNING; \