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 <dslice@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-04-28 10:02:35 -04:00
parent b9f1114e38
commit 6f16f5a019

View File

@ -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; \