From e4d9c77198db018dff0f212fbefe317b0ccc4c74 Mon Sep 17 00:00:00 2001 From: Matthieu Boutier Date: Wed, 24 May 2017 11:45:47 +0200 Subject: [PATCH] babeld: Fix VRF for zebra route messages. Signed-off-by: Matthieu Boutier --- babeld/kernel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/babeld/kernel.c b/babeld/kernel.c index a0c21833b9..fc292d6f94 100644 --- a/babeld/kernel.c +++ b/babeld/kernel.c @@ -160,10 +160,12 @@ kernel_route_v4(int add, quagga_prefix.prefixlen = plen - 96; /* our plen is for v4mapped's addr */ apply_mask_ipv4(&quagga_prefix); + memset(&api, 0, sizeof(api)); api.type = ZEBRA_ROUTE_BABEL; api.flags = 0; api.message = 0; api.safi = SAFI_UNICAST; + api.vrf_id = VRF_DEFAULT; /* Unlike the native Linux and BSD interfaces, Quagga doesn't like there to be both and IPv4 nexthop and an ifindex. Omit the @@ -212,10 +214,13 @@ kernel_route_v6(int add, const unsigned char *pref, unsigned short plen, quagga_prefix.prefixlen = plen; apply_mask_ipv6(&quagga_prefix); + memset(&api, 0, sizeof(api)); api.type = ZEBRA_ROUTE_BABEL; api.flags = 0; api.message = 0; api.safi = SAFI_UNICAST; + api.vrf_id = VRF_DEFAULT; + if(metric >= KERNEL_INFINITY) { api.flags = ZEBRA_FLAG_REJECT; api.nexthop_num = 0; -- 2.39.5