From 7bfa6175483e8316510841b4027913eb8e3c4c11 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 15 Oct 2015 08:58:37 -0700 Subject: [PATCH] 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 --- pimd/pim_zebra.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.5