diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-10-27 21:13:23 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-05-26 02:38:35 +0200 |
commit | c8ae3ce8b6b2c5ec8ce0009118855a60593f29a3 (patch) | |
tree | fdf3ed494aae829f56d7ebf1ad44b5ff8655069d /pimd/pim_rp.c | |
parent | pimd: Move I_am_DR macro to more appropriate place (diff) | |
download | frr-c8ae3ce8b6b2c5ec8ce0009118855a60593f29a3.tar.xz frr-c8ae3ce8b6b2c5ec8ce0009118855a60593f29a3.zip |
pimd: Modify the RP data structure.
Modify the RP data structure to know how to get to it from here.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_rp.c')
-rw-r--r-- | pimd/pim_rp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index d3cd91673..5ad786bad 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -39,22 +39,22 @@ pim_rp_check_rp (struct in_addr old, struct in_addr new) char sold[100]; char snew[100]; char rp[100]; - pim_inet4_dump("<rp?>", qpim_rp, rp, sizeof(rp)); + pim_inet4_dump("<rp?>", qpim_rp.rpf_addr, rp, sizeof(rp)); pim_inet4_dump("<old?>", old, sold, sizeof(sold)); pim_inet4_dump("<new?>", new, snew, sizeof(snew)); zlog_debug("%s: %s for old %s new %s", __func__, rp, sold, snew ); } - if (qpim_rp.s_addr == INADDR_NONE) + if (qpim_rp.rpf_addr.s_addr == INADDR_NONE) return; - if (new.s_addr == qpim_rp.s_addr) + if (new.s_addr == qpim_rp.rpf_addr.s_addr) { i_am_rp = 1; return; } - if (old.s_addr == qpim_rp.s_addr) + if (old.s_addr == qpim_rp.rpf_addr.s_addr) { i_am_rp = 0; return; @@ -84,7 +84,7 @@ pim_rp_g (struct in_addr group) /* * For staticly configured RP, it is always the qpim_rp */ - return(qpim_rp); + return(qpim_rp.rpf_addr); } /* @@ -98,14 +98,14 @@ pim_rp_g (struct in_addr group) int pim_rp_set_upstream_addr (struct in_addr *up, struct in_addr source) { - if ((qpim_rp.s_addr == INADDR_NONE) && (source.s_addr == 0xFFFFFFFF)) + if ((qpim_rp.rpf_addr.s_addr == INADDR_NONE) && (source.s_addr == INADDR_ANY)) { if (PIM_DEBUG_PIM_TRACE) zlog_debug("%s: Received a (*,G) with no RP configured", __PRETTY_FUNCTION__); return 0; } - *up = (source.s_addr == 0xFFFFFFFF) ? qpim_rp : source; + *up = (source.s_addr == INADDR_ANY) ? qpim_rp.rpf_addr : source; return 1; } |