]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Zebra: Ignore status change for VRF (temporary)
authorvivek <vivek@cumulusnetworks.com>
Sat, 20 Feb 2016 06:50:56 +0000 (22:50 -0800)
committervivek <vivek@cumulusnetworks.com>
Sat, 20 Feb 2016 06:50:56 +0000 (22:50 -0800)
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

index 0721df7a4d9624af06301c79b638c3ee5ed8e5b6..d3ee6005c1c7f75616df3b31a0a8b4ff144d1a71 100644 (file)
@@ -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)
         {