mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-02-01 18:56:52 +00:00
pimd: Convert pim_joinprune_send to receive upstream
When sending a join/prune send in the upstream pointer. this will allow us to implement some of the other state machines necessary. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
7f748d9586
commit
372eab92a2
@ -493,7 +493,7 @@ static int on_ifjoin_prune_pending_timer(struct thread *t)
|
||||
|
||||
if (send_prune_echo)
|
||||
pim_joinprune_send (ifp, pim_ifp->primary_address,
|
||||
&sg, 0);
|
||||
ch->upstream, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -395,7 +395,7 @@ int pim_joinprune_recv(struct interface *ifp,
|
||||
|
||||
int pim_joinprune_send(struct interface *ifp,
|
||||
struct in_addr upstream_addr,
|
||||
struct prefix_sg *sg,
|
||||
struct pim_upstream *up,
|
||||
int send_join)
|
||||
{
|
||||
struct pim_interface *pim_ifp;
|
||||
@ -421,7 +421,7 @@ int pim_joinprune_send(struct interface *ifp,
|
||||
zlog_debug("%s: sending %s(S,G)=%s to upstream=%s on interface %s",
|
||||
__PRETTY_FUNCTION__,
|
||||
send_join ? "Join" : "Prune",
|
||||
pim_str_sg_dump (sg), dst_str, ifp->name);
|
||||
pim_str_sg_dump (&up->sg), dst_str, ifp->name);
|
||||
}
|
||||
|
||||
if (PIM_INADDR_IS_ANY(upstream_addr)) {
|
||||
@ -431,7 +431,7 @@ int pim_joinprune_send(struct interface *ifp,
|
||||
zlog_debug("%s: %s(S,G)=%s: upstream=%s is myself on interface %s",
|
||||
__PRETTY_FUNCTION__,
|
||||
send_join ? "Join" : "Prune",
|
||||
pim_str_sg_dump (sg), dst_str, ifp->name);
|
||||
pim_str_sg_dump (&up->sg), dst_str, ifp->name);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -451,7 +451,7 @@ int pim_joinprune_send(struct interface *ifp,
|
||||
Build PIM message
|
||||
*/
|
||||
pim_msg_size = pim_msg_join_prune_encode (pim_msg, 1000, send_join,
|
||||
sg->src, sg->grp,
|
||||
up->sg.src, up->sg.grp,
|
||||
upstream_addr, PIM_JP_HOLDTIME);
|
||||
|
||||
if (pim_msg_size < 0)
|
||||
|
||||
@ -35,7 +35,7 @@ int pim_joinprune_recv(struct interface *ifp,
|
||||
|
||||
int pim_joinprune_send(struct interface *ifp,
|
||||
struct in_addr upstream_addr,
|
||||
struct prefix_sg *sg,
|
||||
struct pim_upstream *up,
|
||||
int send_join);
|
||||
|
||||
#endif /* PIM_JOIN_H */
|
||||
|
||||
@ -212,7 +212,7 @@ pim_upstream_send_join (struct pim_upstream *up)
|
||||
/* send Join(S,G) to the current upstream neighbor */
|
||||
pim_joinprune_send(up->rpf.source_nexthop.interface,
|
||||
up->rpf.rpf_addr.u.prefix4,
|
||||
&up->sg,
|
||||
up,
|
||||
1 /* join */);
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@ pim_upstream_switch(struct pim_upstream *up,
|
||||
forward_off(up);
|
||||
pim_joinprune_send(up->rpf.source_nexthop.interface,
|
||||
up->rpf.rpf_addr.u.prefix4,
|
||||
&up->sg,
|
||||
up,
|
||||
0 /* prune */);
|
||||
if (up->t_join_timer)
|
||||
THREAD_OFF(up->t_join_timer);
|
||||
@ -898,7 +898,7 @@ pim_upstream_keep_alive_timer (struct thread *t)
|
||||
THREAD_OFF (up->t_rs_timer);
|
||||
THREAD_OFF (up->t_join_timer);
|
||||
pim_joinprune_send (up->rpf.source_nexthop.interface, up->rpf.rpf_addr.u.prefix4,
|
||||
&up->sg, 0);
|
||||
up, 0);
|
||||
PIM_UPSTREAM_FLAG_UNSET_SRC_STREAM (up->flags);
|
||||
if (PIM_UPSTREAM_FLAG_TEST_CREATED_BY_UPSTREAM(up->flags))
|
||||
{
|
||||
|
||||
@ -400,12 +400,12 @@ static void scan_upstream_rpf_cache()
|
||||
|
||||
/* send Prune(S,G) to the old upstream neighbor */
|
||||
pim_joinprune_send(old_interface, old_rpf_addr,
|
||||
&up->sg, 0 /* prune */);
|
||||
up, 0 /* prune */);
|
||||
|
||||
/* send Join(S,G) to the current upstream neighbor */
|
||||
pim_joinprune_send(up->rpf.source_nexthop.interface,
|
||||
up->rpf.rpf_addr.u.prefix4,
|
||||
&up->sg,
|
||||
up,
|
||||
1 /* join */);
|
||||
|
||||
pim_upstream_join_timer_restart(up);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user