]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/if.c
lib: qobj: register ifaces, routemaps & keychains
[mirror_frr.git] / lib / if.c
index bd6079c0fd24827f83e30d120330403f9781b2cc..2add03d67c1ce7db24bdcfbea040592ece061406 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -43,6 +43,8 @@ DEFINE_MTYPE_STATIC(LIB, NBR_CONNECTED,   "Neighbor Connected")
 DEFINE_MTYPE(       LIB, CONNECTED_LABEL, "Connected interface label")
 DEFINE_MTYPE_STATIC(LIB, IF_LINK_PARAMS,  "Informational Link Parameters")
 
+DEFINE_QOBJ_TYPE(interface)
+
 /* List of interfaces in only the default VRF */
 int ptm_enable = 0;
 
@@ -149,6 +151,8 @@ if_create_vrf (const char *name, int namelen, vrf_id_t vrf_id)
   /* Enable Link-detection by default */
   SET_FLAG(ifp->status, ZEBRA_INTERFACE_LINKDETECTION);
 
+  QOBJ_REG (ifp, interface);
+
   if (if_master.if_new_hook)
     (*if_master.if_new_hook) (ifp);
 
@@ -193,6 +197,8 @@ if_delete_retain (struct interface *ifp)
   if (if_master.if_delete_hook)
     (*if_master.if_delete_hook) (ifp);
 
+  QOBJ_UNREG (ifp);
+
   /* Free connected address list */
   list_delete_all_node (ifp->connected);