From 6f16f5a01976f16ee0676b2435fc24382bcc29e9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 28 Apr 2016 10:02:35 -0400 Subject: [PATCH] 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 --- lib/vrf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; \ -- 2.39.5