From: Donald Sharp Date: Thu, 15 Oct 2015 15:58:37 +0000 (-0700) Subject: pimd: Check to see if we are the RP X-Git-Tag: frr-2.0-rc1~830 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7bfa6175483e8316510841b4027913eb8e3c4c11;p=mirror%2Ffrr.git pimd: Check to see if we are the RP 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 --- diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index c8b362c140..5add833658 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -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;