babeld: add MP-specific zclient API fix

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.
This commit is contained in:
Denis Ovsienko 2012-01-21 23:16:00 +04:00 committed by Paul Jakma
parent ec8d8d5ba6
commit a19a3bf947

View 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;