From: vivek Date: Sat, 20 Feb 2016 06:50:56 +0000 (-0800) Subject: Zebra: Ignore status change for VRF (temporary) X-Git-Tag: frr-2.0-rc1~1112 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=3e66be2ee6db028d808a304586e0b24d5374914e;p=mirror%2Ffrr.git Zebra: Ignore status change for VRF (temporary) Temporary change to ignore status change for a VRF device as it is incorrectly implemented now. When VRF is also supported as an interface, the status change will be handled for the interface. Ticket: Reviewed By: Testing Done: --- diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 0721df7a4d..d3ee6005c1 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -540,6 +540,19 @@ netlink_vrf_change (struct nlmsghdr *h, struct rtattr *tb, const char *name) zlog_debug ("%s: RTM_NEWLINK for VRF(%s) index %u, table %u", __func__, name, ifi->ifi_index, nl_table_id); + /* If VRF already exists, we just return; status changes are ignored + * for now. + * TODO: Status changes will be handled against the VRF "interface". + */ + vrf = vrf_lookup ((vrf_id_t)ifi->ifi_index); + if (vrf) + { + if (IS_ZEBRA_DEBUG_KERNEL) + zlog_debug ("%s: RTM_NEWLINK status for VRF(%s) index %u - ignored", + __func__, name, ifi->ifi_index); + return; + } + vrf = vrf_get((vrf_id_t)ifi->ifi_index, name); // It would create vrf if (!vrf) {