]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Rehookup the redistribution code
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 3 Jun 2016 10:20:05 +0000 (06:20 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 3 Jun 2016 10:20:05 +0000 (06:20 -0400)
Due to rewrite of the redistribution mechanism in ZEBRA,
rehookup the redist statements to pimd from zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_zebra.c

index 989054636ad8931fa468e4408b4e370af1551f86..c48629f05aa4e68a052e430bd79e02dd59c959f6 100644 (file)
@@ -531,6 +531,7 @@ static int redist_read_ipv4_route(int command, struct zclient *zclient,
 
   /* Type, flags, message. */
   api.type = stream_getc(s);
+  api.instance = stream_getw (s);
   api.flags = stream_getc(s);
   api.message = stream_getc(s);
 
@@ -588,7 +589,13 @@ static int redist_read_ipv4_route(int command, struct zclient *zclient,
     stream_getl(s) :
     0;
 
+  if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
+    api.tag = stream_getw (s);
+  else
+    api.tag = 0;
+
   switch (command) {
+  case ZEBRA_REDISTRIBUTE_IPV4_ADD:
   case ZEBRA_IPV4_ROUTE_ADD:
     if (PIM_DEBUG_ZEBRA) {
       char buf[2][INET_ADDRSTRLEN];
@@ -606,6 +613,7 @@ static int redist_read_ipv4_route(int command, struct zclient *zclient,
                 api.distance);
     }
     break;
+  case ZEBRA_REDISTRIBUTE_IPV4_DEL:
   case ZEBRA_IPV4_ROUTE_DELETE:
     if (PIM_DEBUG_ZEBRA) {
       char buf[2][INET_ADDRSTRLEN];
@@ -664,6 +672,8 @@ void pim_zebra_init(char *zebra_sock_path)
   qpim_zclient_update->interface_address_delete = pim_zebra_if_address_del;
   qpim_zclient_update->ipv4_route_add           = redist_read_ipv4_route;
   qpim_zclient_update->ipv4_route_delete        = redist_read_ipv4_route;
+  qpim_zclient_update->redistribute_route_ipv4_add    = redist_read_ipv4_route;
+  qpim_zclient_update->redistribute_route_ipv4_del    = redist_read_ipv4_route;
 
   zclient_init(qpim_zclient_update, ZEBRA_ROUTE_PIM, 0);
   if (PIM_DEBUG_PIM_TRACE) {