summaryrefslogtreecommitdiff
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-02-11 14:49:12 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2019-06-11 17:10:47 +0200
commit4c634658a6aaf835eff892f7ac959aef9f0c59c8 (patch)
tree592d73567658aa3f75a52907ca2856debb0f9c8e /zebra/kernel_socket.c
parent6aba4eeaecdb0307fda736d2bec968e5da0d5dfb (diff)
ospf, ospf6d, zebra, lib: change if_get_by_name prototype with vrf
vrf pointer is used as reference when calling if_get_by_name() function. this will permit to create interfaces with an unknown vrf_id, since it is only necessary to get the vrf structure to store the interfaces. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/kernel_socket.c')
-rw-r--r--zebra/kernel_socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 156ce50725..9e1593a120 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -435,6 +435,7 @@ static void rtm_flag_dump(int flag)
static int ifan_read(struct if_announcemsghdr *ifan)
{
struct interface *ifp;
+ struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT);
ifp = if_lookup_by_index(ifan->ifan_index, VRF_DEFAULT);
@@ -450,7 +451,7 @@ static int ifan_read(struct if_announcemsghdr *ifan)
__func__, ifan->ifan_index, ifan->ifan_name);
/* Create Interface */
- ifp = if_get_by_name(ifan->ifan_name, VRF_DEFAULT);
+ ifp = if_get_by_name(ifan->ifan_name, vrf);
if_set_index(ifp, ifan->ifan_index);
if_get_metric(ifp);