fix zebra protocol after MP-BGP changes
The previous commits modified both zebra and bgpd for additional
SAFI field, but not any other routing daemon, which led to zebra
daemon crashing with failed assertion.
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c
index 9ee5ffc..d5ccef9 100644
--- a/isisd/isis_zebra.c
+++ b/isisd/isis_zebra.c
@@ -274,6 +274,8 @@
stream_putc (stream, flags);
/* message */
stream_putc (stream, message);
+ /* SAFI */
+ stream_putw (stream, SAFI_UNICAST);
/* prefix information */
psize = PSIZE (prefix->prefixlen);
stream_putc (stream, prefix->prefixlen);
@@ -321,6 +323,7 @@
api.type = ZEBRA_ROUTE_ISIS;
api.flags = 0;
api.message = 0;
+ api.safi = SAFI_UNICAST;
prefix4.family = AF_INET;
prefix4.prefixlen = prefix->prefixlen;
prefix4.prefix = prefix->u.prefix4;
@@ -350,6 +353,7 @@
api.type = ZEBRA_ROUTE_ISIS;
api.flags = 0;
api.message = 0;
+ api.safi = SAFI_UNICAST;
SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
SET_FLAG (api.message, ZAPI_MESSAGE_IFINDEX);
SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
@@ -433,6 +437,7 @@
api.type = ZEBRA_ROUTE_ISIS;
api.flags = 0;
api.message = 0;
+ api.safi = SAFI_UNICAST;
SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
SET_FLAG (api.message, ZAPI_MESSAGE_IFINDEX);
api.nexthop_num = listcount (route_info->nexthops6);
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index 881771a..f09e9d2 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -451,6 +451,7 @@
api.type = ZEBRA_ROUTE_OSPF6;
api.flags = 0;
api.message = 0;
+ api.safi = SAFI_UNICAST;
SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
api.nexthop_num = nhcount;
api.nexthop = nexthops;
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index bffa90d..f8d1cb7 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -358,6 +358,7 @@
stream_putc (s, ZEBRA_ROUTE_OSPF);
stream_putc (s, flags);
stream_putc (s, message);
+ stream_putw (s, SAFI_UNICAST);
/* Put prefix information. */
psize = PSIZE (p->prefixlen);
@@ -427,6 +428,7 @@
api.type = ZEBRA_ROUTE_OSPF;
api.flags = 0;
api.message = 0;
+ api.safi = SAFI_UNICAST;
api.ifindex_num = 0;
api.nexthop_num = 0;
@@ -483,6 +485,7 @@
api.type = ZEBRA_ROUTE_OSPF;
api.flags = ZEBRA_FLAG_BLACKHOLE;
api.message = 0;
+ api.safi = SAFI_UNICAST;
SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
api.nexthop_num = 0;
api.ifindex_num = 0;
@@ -505,6 +508,7 @@
api.type = ZEBRA_ROUTE_OSPF;
api.flags = ZEBRA_FLAG_BLACKHOLE;
api.message = 0;
+ api.safi = SAFI_UNICAST;
SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
api.nexthop_num = 0;
api.ifindex_num = 0;
diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c
index c476d8f..1d10b10 100644
--- a/ripd/rip_zebra.c
+++ b/ripd/rip_zebra.c
@@ -46,6 +46,7 @@
api.type = ZEBRA_ROUTE_RIP;
api.flags = 0;
api.message = 0;
+ api.safi = SAFI_UNICAST;
SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
api.nexthop_num = 1;
api.nexthop = &nexthop;
@@ -76,6 +77,7 @@
api.type = ZEBRA_ROUTE_RIP;
api.flags = 0;
api.message = 0;
+ api.safi = SAFI_UNICAST;
SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
api.nexthop_num = 1;
api.nexthop = &nexthop;
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index 4c44455..c931a29 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -53,6 +53,7 @@
api.type = ZEBRA_ROUTE_RIPNG;
api.flags = 0;
api.message = 0;
+ api.safi = SAFI_UNICAST;
SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
api.nexthop_num = 1;
api.nexthop = &nexthop;
@@ -77,6 +78,7 @@
api.type = ZEBRA_ROUTE_RIPNG;
api.flags = 0;
api.message = 0;
+ api.safi = SAFI_UNICAST;
SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
api.nexthop_num = 1;
api.nexthop = &nexthop;