]> git.proxmox.com Git - mirror_frr.git/commitdiff
fix zebra protocol after MP-BGP changes
authorDenis Ovsienko <infrastation@yandex.ru>
Mon, 5 Dec 2011 12:35:14 +0000 (16:35 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 23 Jan 2012 10:31:42 +0000 (14:31 +0400)
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.

isisd/isis_zebra.c
ospf6d/ospf6_zebra.c
ospfd/ospf_zebra.c
ripd/rip_zebra.c
ripngd/ripng_zebra.c

index 9ee5ffc5d22ea07a8cc5cdfab13c1114f0820a13..d5ccef9ea0947eacb9e90203ec8b2ac887099fb9 100644 (file)
@@ -274,6 +274,8 @@ isis_zebra_route_add_ipv4 (struct prefix *prefix,
       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 @@ isis_zebra_route_del_ipv4 (struct prefix *prefix,
       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 @@ isis_zebra_route_add_ipv6 (struct prefix *prefix,
   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 @@ isis_zebra_route_del_ipv6 (struct prefix *prefix,
   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);
index 881771a7f4d921464798a92d9dc811e820cb9a3f..f09e9d22cc2bb9a90d59abc61055687e0e26a416 100644 (file)
@@ -451,6 +451,7 @@ ospf6_zebra_route_update (int type, struct ospf6_route *request)
   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;
index bffa90dbad96095e2736ed473f9ec6591770a3e0..f8d1cb7c678477e350eb688a608b7b59b3d6f8d1 100644 (file)
@@ -358,6 +358,7 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
       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 @@ ospf_zebra_delete (struct prefix_ipv4 *p, struct ospf_route *or)
       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 @@ ospf_zebra_add_discard (struct prefix_ipv4 *p)
       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 @@ ospf_zebra_delete_discard (struct prefix_ipv4 *p)
       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;
index c476d8f489fa8966aceed3b65dc8c54a3ec05804..1d10b10372ef9663833ef7ee09f31189ec63941a 100644 (file)
@@ -46,6 +46,7 @@ rip_zebra_ipv4_add (struct prefix_ipv4 *p, struct in_addr *nexthop,
       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 @@ rip_zebra_ipv4_delete (struct prefix_ipv4 *p, struct in_addr *nexthop,
       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;
index 4c4445506c8c93dc5670850e4da06f3bcf19ce33..c931a291796f9d478619e2c668a0ea573e257827 100644 (file)
@@ -53,6 +53,7 @@ ripng_zebra_ipv6_add (struct prefix_ipv6 *p, struct in6_addr *nexthop,
       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 @@ ripng_zebra_ipv6_delete (struct prefix_ipv6 *p, struct in6_addr *nexthop,
       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;