]> git.puffer.fish Git - matthieu/frr.git/commitdiff
babeld: add MP-specific zclient API fix
authorDenis Ovsienko <infrastation@yandex.ru>
Sat, 21 Jan 2012 19:16:00 +0000 (23:16 +0400)
committerPaul Jakma <paul@quagga.net>
Sun, 25 Mar 2012 16:06:53 +0000 (17:06 +0100)
Add proper initialization of SAFI field, which is present in the
revisions of zapi_ipv4 and zapi_ipv6 structures specific to
MP-BGP patchset. Without this change no Babel routes could make
into zebra RIB.

babeld/kernel_zebra.c

index 7ddc797dc6e4810b77b5ad8d8365179a4984c757..53da5f4021a9116f5fb1b855491f78568856c1f4 100644 (file)
@@ -206,6 +206,7 @@ kernel_route_add_v4(const unsigned char *pref, unsigned short plen,
     api.type  = ZEBRA_ROUTE_BABEL;
     api.flags = 0;
     api.message = 0;
+    api.safi = SAFI_UNICAST;
     SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
     api.nexthop_num = 1;
     api.nexthop = &nexthop_pointer;
@@ -248,6 +249,7 @@ kernel_route_add_v6(const unsigned char *pref, unsigned short plen,
     api.type  = ZEBRA_ROUTE_BABEL;
     api.flags = 0;
     api.message = 0;
+    api.safi = SAFI_UNICAST;
     SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
     api.nexthop_num = 1;
     api.nexthop = &nexthop_pointer;
@@ -291,6 +293,7 @@ kernel_route_delete_v4(const unsigned char *pref, unsigned short plen,
     api.type  = ZEBRA_ROUTE_BABEL;
     api.flags = 0;
     api.message = 0;
+    api.safi = SAFI_UNICAST;
     SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
     api.nexthop_num = 1;
     api.nexthop = &nexthop_pointer;
@@ -334,6 +337,7 @@ kernel_route_delete_v6(const unsigned char *pref, unsigned short plen,
     api.type  = ZEBRA_ROUTE_BABEL;
     api.flags = 0;
     api.message = 0;
+    api.safi = SAFI_UNICAST;
     SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
     api.nexthop_num = 1;
     api.nexthop = &nexthop_pointer;