summaryrefslogtreecommitdiffstats
path: root/zebra/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 74c977a9..dec91297 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -483,6 +483,22 @@ if_delete_update (struct interface *ifp)
ifp->ifindex = IFINDEX_INTERNAL;
}
+/* Quagga daemons don't handle rename, so delete then add */
+void
+if_rename (struct interface *ifp, const char *name)
+{
+ int ifindex = ifp->ifindex;
+
+ if_delete_update(ifp);
+ listnode_delete (iflist, ifp);
+
+ strncpy(ifp->name, name, INTERFACE_NAMSIZ);
+ ifp->ifindex = ifindex;
+
+ listnode_add_sort (iflist, ifp);
+ if_add_update (ifp);
+}
+
/* Interface is up. */
void
if_up (struct interface *ifp)