]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Check to see if we are the RP
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 15 Oct 2015 15:58:37 +0000 (08:58 -0700)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Thu, 26 May 2016 00:38:34 +0000 (20:38 -0400)
Add code to allow on interface up/down events the check of whether
or not this process is the RP.

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

index c8b362c140081da89ed1650d9676a24230575ee3..5add8336588e7f535d9ca11d89815208d93e170f 100644 (file)
@@ -238,6 +238,7 @@ static int pim_zebra_if_address_add(int command, struct zclient *zclient,
 {
   struct connected *c;
   struct prefix *p;
+  struct in_addr old = { .s_addr = 0 };
 
   /*
     zebra api notifies address adds/dels events by using the same call
@@ -268,6 +269,8 @@ static int pim_zebra_if_address_add(int command, struct zclient *zclient,
 #endif
   }
 
+  pim_rp_check_rp (old, p->u.prefix4);
+
   if (!CHECK_FLAG(c->flags, ZEBRA_IFA_SECONDARY)) {
     /* trying to add primary address */
 
@@ -300,6 +303,7 @@ static int pim_zebra_if_address_del(int command, struct zclient *client,
 {
   struct connected *c;
   struct prefix *p;
+  struct in_addr new = { .s_addr = 0 };
 
   /*
     zebra api notifies address adds/dels events by using the same call
@@ -330,6 +334,7 @@ static int pim_zebra_if_address_del(int command, struct zclient *client,
 #endif
   }
 
+  pim_rp_check_rp (p->u.prefix4, new);
   pim_if_addr_del(c, 0);
   
   return 0;