]> git.proxmox.com Git - mirror_frr.git/commitdiff
babeld: Fix redistribute events for v4/6 up from zebra
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 25 May 2017 00:11:15 +0000 (20:11 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 25 May 2017 00:14:53 +0000 (20:14 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
babeld/babel_zebra.c

index e09c265347851045abf39b74caa97b538f72ee7d..f54f5b34699836236342cd2c98e32daf81c8aa83 100644 (file)
@@ -102,7 +102,8 @@ babel_zebra_read_ipv6 (int command, struct zclient *zclient,
 
     /* Type, flags, message. */
     api.type = stream_getc (s);
-    api.flags = stream_getc (s);
+    api.instance = stream_getw (s);
+    api.flags = stream_getl (s);
     api.message = stream_getc (s);
 
     /* IPv6 prefix. */
@@ -128,7 +129,7 @@ babel_zebra_read_ipv6 (int command, struct zclient *zclient,
     else
         api.metric = 0;
 
-    if (command == ZEBRA_IPV6_ROUTE_ADD)
+    if (command == ZEBRA_REDISTRIBUTE_IPV6_ADD)
         babel_ipv6_route_add(&api, &prefix, ifindex, &nexthop);
     else
         babel_ipv6_route_delete(&api, &prefix, ifindex);
@@ -154,7 +155,8 @@ babel_zebra_read_ipv4 (int command, struct zclient *zclient,
 
     /* Type, flags, message. */
     api.type = stream_getc (s);
-    api.flags = stream_getc (s);
+    api.instance = stream_getw (s);
+    api.flags = stream_getl (s);
     api.message = stream_getc (s);
 
     /* IPv6 prefix. */
@@ -180,7 +182,7 @@ babel_zebra_read_ipv4 (int command, struct zclient *zclient,
     else
         api.metric = 0;
 
-    if (command == ZEBRA_IPV4_ROUTE_ADD) {
+    if (command == ZEBRA_REDISTRIBUTE_IPV4_ADD) {
         babel_ipv4_route_add(&api, &prefix, ifindex, &nexthop);
     } else {
         babel_ipv4_route_delete(&api, &prefix, ifindex);