summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/if.c4
-rw-r--r--lib/if.h6
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/if.c b/lib/if.c
index 1e34ff4b84..371c6bef87 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -1423,6 +1423,8 @@ static int lib_interface_create(enum nb_event event,
#else
ifp = if_get_by_name(ifname, vrf->vrf_id);
#endif /* SUNOS_5 */
+
+ ifp->configured = true;
nb_running_set_entry(dnode, ifp);
break;
}
@@ -1450,6 +1452,8 @@ static int lib_interface_destroy(enum nb_event event,
break;
case NB_EV_APPLY:
ifp = nb_running_unset_entry(dnode);
+
+ ifp->configured = false;
if_delete(ifp);
break;
}
diff --git a/lib/if.h b/lib/if.h
index e3ec278f9f..ee99fad2e1 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -293,6 +293,12 @@ struct interface {
struct route_node *node;
vrf_id_t vrf_id;
+ /*
+ * Has the end users entered `interface XXXX` from the cli in some
+ * fashion?
+ */
+ bool configured;
+
QOBJ_FIELDS
};