]> git.puffer.fish Git - mirror/frr.git/commitdiff
Quagga: Fix interface move from VRF to default VRF
authorvivek <vivek@cumulusnetworks.com>
Sun, 28 Feb 2016 03:06:35 +0000 (03:06 +0000)
committervivek <vivek@cumulusnetworks.com>
Sun, 28 Feb 2016 03:06:35 +0000 (03:06 +0000)
Ensure that during interface lookup (non-vty context), if the interface is
found in a different VRF, it is "moved" into the requested VRF.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-9579
Reviewed By: CCR-4194
Testing Done: Manual

lib/if.c

index 6a8a5242e1bd9cbf1873bd18c33c7a73f5b42dde..cf88b031b3c7fae51ec118cd0eedc4768526336b 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -479,10 +479,12 @@ if_get_by_name_len_vrf (const char *name, size_t namelen, vrf_id_t vrf_id, int v
               * from the kernel by way of zclient,  believe it and update
               * the ifp accordingly.
               */
-             if (vrf_id == VRF_DEFAULT)
-               return ifp;
-             if (vty)
-               return NULL;
+              if (vty)
+                {
+                  if (vrf_id == VRF_DEFAULT)
+                    return ifp;
+                  return NULL;
+                }
              else
                {
                  if_update_vrf (ifp, name, namelen, vrf_id);