diff options
-rw-r--r-- | lib/if.c | 12 | ||||
-rw-r--r-- | lib/if.h | 5 | ||||
-rw-r--r-- | ospfd/ospf_interface.c | 2 | ||||
-rw-r--r-- | pimd/pim_iface.c | 2 | ||||
-rw-r--r-- | zebra/kernel_socket.c | 2 |
5 files changed, 8 insertions, 15 deletions
@@ -123,7 +123,7 @@ if_cmp_func (struct interface *ifp1, struct interface *ifp2) /* Create new interface structure. */ struct interface * -if_create_vrf (const char *name, int namelen, vrf_id_t vrf_id) +if_create (const char *name, int namelen, vrf_id_t vrf_id) { struct interface *ifp; struct list *intf_list = vrf_iflist_get (vrf_id); @@ -158,12 +158,6 @@ if_create_vrf (const char *name, int namelen, vrf_id_t vrf_id) return ifp; } -struct interface * -if_create (const char *name, int namelen) -{ - return if_create_vrf (name, namelen, VRF_DEFAULT); -} - /* Create new interface structure. */ void if_update_vrf (struct interface *ifp, const char *name, int namelen, vrf_id_t vrf_id) @@ -468,7 +462,7 @@ if_get_by_name_vrf (const char *name, vrf_id_t vrf_id) struct interface *ifp; return ((ifp = if_lookup_by_name_vrf (name, vrf_id)) != NULL) ? ifp : - if_create_vrf (name, strlen(name), vrf_id); + if_create (name, strlen(name), vrf_id); } struct interface * @@ -515,7 +509,7 @@ if_get_by_name_len_vrf (const char *name, size_t namelen, vrf_id_t vrf_id, int v } } } - return (if_create_vrf (name, namelen, vrf_id)); + return (if_create (name, namelen, vrf_id)); } struct interface * @@ -389,15 +389,14 @@ struct nbr_connected /* Prototypes. */ extern int if_cmp_name_func (char *, char *); -extern struct interface *if_create (const char *name, int namelen); extern struct interface *if_lookup_exact_address (void *matchaddr, int family); extern struct connected *if_lookup_address (void *matchaddr, int family); extern struct interface *if_lookup_prefix (struct prefix *prefix); extern void if_update_vrf (struct interface *, const char *name, int namelen, vrf_id_t vrf_id); -extern struct interface *if_create_vrf (const char *name, int namelen, - vrf_id_t vrf_id); +extern struct interface *if_create (const char *name, int namelen, + vrf_id_t vrf_id); extern struct interface *if_lookup_by_index (ifindex_t, vrf_id_t vrf_id); extern struct interface *if_lookup_exact_address_vrf (void *matchaddr, int family, vrf_id_t vrf_id); diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index 936ec6966..4fb206589 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -874,7 +874,7 @@ ospf_vl_new (struct ospf *ospf, struct ospf_vl_data *vl_data) zlog_debug ("ospf_vl_new(): creating pseudo zebra interface"); snprintf (ifname, sizeof(ifname), "VLINK%d", vlink_count); - vi = if_create (ifname, strnlen(ifname, sizeof(ifname))); + vi = if_create (ifname, strnlen(ifname, sizeof(ifname)), VRF_DEFAULT); /* * if_create sets ZEBRA_INTERFACE_LINKDETECTION * virtual links don't need this. diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index def72c29f..76687cea3 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -1471,7 +1471,7 @@ void pim_if_update_assert_tracking_desired(struct interface *ifp) void pim_if_create_pimreg (void) { if (!pim_regiface) { - pim_regiface = if_create("pimreg", strlen("pimreg")); + pim_regiface = if_create("pimreg", strlen("pimreg"), VRF_DEFAULT); pim_regiface->ifindex = PIM_OIF_PIM_REGISTER_VIF; pim_if_new(pim_regiface, 0, 0); diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 20de52c11..ad04e1a8a 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -517,7 +517,7 @@ ifm_read (struct if_msghdr *ifm) if (ifp == NULL) { /* Interface that zebra was not previously aware of, so create. */ - ifp = if_create (ifname, ifnlen); + ifp = if_create (ifname, ifnlen, VRF_DEFAULT); if (IS_ZEBRA_DEBUG_KERNEL) zlog_debug ("%s: creating ifp for ifindex %d", __func__, ifm->ifm_index); |