summaryrefslogtreecommitdiffstats
path: root/lib/if.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2020-05-19 13:57:08 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2020-05-19 16:02:12 +0200
commit1f7a68a2ff0ba1424131f30112e0cc1572f0bee3 (patch)
tree206d974454a96d215213a62a41f4589b1f603d42 /lib/if.h
parentMerge pull request #6344 from dslicenc/ospf6-routemap-delete (diff)
downloadfrr-1f7a68a2ff0ba1424131f30112e0cc1572f0bee3.tar.xz
frr-1f7a68a2ff0ba1424131f30112e0cc1572f0bee3.zip
lib, zebra: update interface name at netlink creation
the interface name was not present in the hook in charge of updating the interface context to the registered hook service. For that, update the name before informing it. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/if.h')
-rw-r--r--lib/if.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/if.h b/lib/if.h
index 6a3680656..c35853d29 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -509,7 +509,8 @@ extern void if_update_to_new_vrf(struct interface *, vrf_id_t vrf_id);
extern struct interface *if_create_name(const char *name, vrf_id_t vrf_id);
/* Create new interface, adds to index list only */
-extern struct interface *if_create_ifindex(ifindex_t ifindex, vrf_id_t vrf_id);
+extern struct interface *if_create_ifindex(ifindex_t ifindex, vrf_id_t vrf_id,
+ char *name);
extern struct interface *if_lookup_by_index(ifindex_t, vrf_id_t vrf_id);
extern struct interface *if_lookup_by_index_all_vrf(ifindex_t);
extern struct interface *if_lookup_exact_address(const void *matchaddr,
@@ -524,8 +525,8 @@ size_t if_lookup_by_hwaddr(const uint8_t *hw_addr, size_t addrsz,
extern struct interface *if_lookup_by_name_all_vrf(const char *ifname);
extern struct interface *if_lookup_by_name(const char *ifname, vrf_id_t vrf_id);
extern struct interface *if_get_by_name(const char *ifname, vrf_id_t vrf_id);
-extern struct interface *if_get_by_ifindex(ifindex_t ifindex, vrf_id_t vrf_id);
-
+extern struct interface *if_get_by_ifindex(ifindex_t ifindex, vrf_id_t vrf_id,
+ char *optional_name);
/* Sets the index and adds to index list */
extern int if_set_index(struct interface *ifp, ifindex_t ifindex);
/* Sets the name and adds to name list */