summaryrefslogtreecommitdiff
path: root/babeld/kernel.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-11-20 11:36:46 -0800
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-11-20 11:36:46 -0800
commit1a1f4efab365954c7b0ab56e974c2d707c0923c5 (patch)
treeb54a9d3f085014bc38d6e1b21c39f703e7d1f4d5 /babeld/kernel.c
parentf1121188c7c767d0ad45c02c852a984994f13223 (diff)
Quagga: vrf_id not being set correctly
Several routing protocols use the zapi_ipv[4|6] api to talk to zebra. There are some instances where the api.vrf_id was not being set. Since the practice is to declare the api structure on the stack, the data inside is not being set to 0. As such random vrf_id values were being passed to zebrad causing rage and confusion. Ticket: CM-8287 Reviewed-by: CCR-3841 Testing: Test suites no longer crashing and burning Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'babeld/kernel.c')
-rw-r--r--babeld/kernel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/babeld/kernel.c b/babeld/kernel.c
index efbb700050..061d669256 100644
--- a/babeld/kernel.c
+++ b/babeld/kernel.c
@@ -177,6 +177,7 @@ kernel_route_v4(int add,
quagga_prefix.prefixlen = plen - 96; /* our plen is for v4mapped's addr */
apply_mask_ipv4(&quagga_prefix);
+ api.vrf_id = VRF_DEFAULT;
api.type = ZEBRA_ROUTE_BABEL;
api.flags = 0;
api.message = 0;
@@ -229,6 +230,7 @@ kernel_route_v6(int add, const unsigned char *pref, unsigned short plen,
quagga_prefix.prefixlen = plen;
apply_mask_ipv6(&quagga_prefix);
+ api.vrf_id = VRF_DEFAULT;
api.type = ZEBRA_ROUTE_BABEL;
api.flags = 0;
api.message = 0;