From ef7bd2a3d5ecab37018f4035391f99c25ddadeab Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 18 Sep 2019 22:26:55 -0400 Subject: *: Switch all zclient->interface_add to interface create callback Switch the zclient->interface_add functionality to have everyone use the interface create callback in lib/if.c Signed-off-by: Donald Sharp --- lib/if.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/if.c') diff --git a/lib/if.c b/lib/if.c index 9d316856da..8d68e1958e 100644 --- a/lib/if.c +++ b/lib/if.c @@ -175,6 +175,12 @@ static struct interface *if_create_backend(const char *name, ifindex_t ifindex, return ifp; } +void if_new_via_zapi(struct interface *ifp) +{ + if (ifp_master.create_hook) + (*ifp_master.create_hook)(ifp); +} + struct interface *if_create(const char *name, vrf_id_t vrf_id) { return if_create_backend(name, IFINDEX_INTERNAL, vrf_id); -- cgit v1.2.3