diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-05-22 20:52:18 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-07-24 19:51:37 +0200 |
commit | 4097373f906c660faf44f1ce6990b345c3737619 (patch) | |
tree | 3f2054d2eeda97a9f82d88d958973e9c3492475d | |
parent | pimd: Fix startup of pim instance a bit (diff) | |
download | frr-4097373f906c660faf44f1ce6990b345c3737619.tar.xz frr-4097373f906c660faf44f1ce6990b345c3737619.zip |
pimd: Fix intentional pass of NULL
pim_msdp_pkt_sa_gen is intentionally passed mp as NULL
in some cases, so we need to pass through the pim instance
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r-- | pimd/pim_msdp_packet.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pimd/pim_msdp_packet.c b/pimd/pim_msdp_packet.c index 8f93e6571..f9e68bffe 100644 --- a/pimd/pim_msdp_packet.c +++ b/pimd/pim_msdp_packet.c @@ -370,21 +370,22 @@ static void pim_msdp_pkt_sa_fill_one(struct pim_msdp_sa *sa) stream_put_ipv4(sa->pim->msdp.work_obuf, sa->sg.src.s_addr); } -static void pim_msdp_pkt_sa_gen(struct pim_msdp_peer *mp) +static void pim_msdp_pkt_sa_gen(struct pim_instance *pim, + struct pim_msdp_peer *mp) { struct listnode *sanode; struct pim_msdp_sa *sa; int sa_count; - int local_cnt = mp->pim->msdp.local_cnt; + int local_cnt = pim->msdp.local_cnt; sa_count = 0; if (PIM_DEBUG_MSDP_INTERNAL) { zlog_debug(" sa gen %d", local_cnt); } - local_cnt = pim_msdp_pkt_sa_fill_hdr(mp->pim, local_cnt); + local_cnt = pim_msdp_pkt_sa_fill_hdr(pim, local_cnt); - for (ALL_LIST_ELEMENTS_RO(mp->pim->msdp.sa_list, sanode, sa)) { + for (ALL_LIST_ELEMENTS_RO(pim->msdp.sa_list, sanode, sa)) { if (!(sa->flags & PIM_MSDP_SAF_LOCAL)) { /* current implementation of MSDP is for anycast i.e. * full mesh. so @@ -403,8 +404,7 @@ static void pim_msdp_pkt_sa_gen(struct pim_msdp_peer *mp) zlog_debug(" sa gen for remainder %d", local_cnt); } - local_cnt = - pim_msdp_pkt_sa_fill_hdr(mp->pim, local_cnt); + local_cnt = pim_msdp_pkt_sa_fill_hdr(pim, local_cnt); } } @@ -431,7 +431,7 @@ static void pim_msdp_pkt_sa_tx_done(struct pim_instance *pim) void pim_msdp_pkt_sa_tx(struct pim_instance *pim) { - pim_msdp_pkt_sa_gen(NULL /* mp */); + pim_msdp_pkt_sa_gen(pim, NULL /* mp */); pim_msdp_pkt_sa_tx_done(pim); } @@ -446,7 +446,7 @@ void pim_msdp_pkt_sa_tx_one(struct pim_msdp_sa *sa) /* when a connection is first established we push all SAs immediately */ void pim_msdp_pkt_sa_tx_to_one_peer(struct pim_msdp_peer *mp) { - pim_msdp_pkt_sa_gen(mp); + pim_msdp_pkt_sa_gen(mp->pim, mp); pim_msdp_pkt_sa_tx_done(mp->pim); } |