From 3e66be2ee6db028d808a304586e0b24d5374914e Mon Sep 17 00:00:00 2001 From: vivek Date: Fri, 19 Feb 2016 22:50:56 -0800 Subject: [PATCH] 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: --- zebra/rt_netlink.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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) { -- 2.39.5