summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pimd/pim_ifchannel.c12
-rw-r--r--pimd/pim_ifchannel.h3
-rw-r--r--pimd/pim_join.c16
3 files changed, 13 insertions, 18 deletions
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index 17e3de571..06f5b756b 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -617,25 +617,19 @@ void pim_ifchannel_join_add(struct interface *ifp,
void pim_ifchannel_prune(struct interface *ifp,
struct in_addr upstream,
- struct in_addr source_addr,
- struct in_addr group_addr,
+ struct prefix *sg,
uint8_t source_flags,
uint16_t holdtime)
{
struct pim_ifchannel *ch;
int jp_override_interval_msec;
- struct prefix sg;
-
- memset (&sg, 0, sizeof (struct prefix));
- sg.u.sg.src = source_addr;
- sg.u.sg.grp = group_addr;
if (nonlocal_upstream(0 /* prune */, ifp, upstream,
- source_addr, group_addr, source_flags, holdtime)) {
+ sg->u.sg.src, sg->u.sg.grp, source_flags, holdtime)) {
return;
}
- ch = pim_ifchannel_add(ifp, &sg);
+ ch = pim_ifchannel_add(ifp, sg);
if (!ch)
return;
diff --git a/pimd/pim_ifchannel.h b/pimd/pim_ifchannel.h
index 17678f742..1fb066445 100644
--- a/pimd/pim_ifchannel.h
+++ b/pimd/pim_ifchannel.h
@@ -115,8 +115,7 @@ void pim_ifchannel_join_add(struct interface *ifp,
uint16_t holdtime);
void pim_ifchannel_prune(struct interface *ifp,
struct in_addr upstream,
- struct in_addr source_addr,
- struct in_addr group_addr,
+ struct prefix *sg,
uint8_t source_flags,
uint16_t holdtime);
void pim_ifchannel_local_membership_add(struct interface *ifp,
diff --git a/pimd/pim_join.c b/pimd/pim_join.c
index afebc0310..e0ad3e439 100644
--- a/pimd/pim_join.c
+++ b/pimd/pim_join.c
@@ -87,24 +87,26 @@ static void recv_prune(struct interface *ifp,
struct in_addr source,
uint8_t source_flags)
{
+ struct prefix sg;
+
+ memset (&sg, 0, sizeof (struct prefix));
+ sg.u.sg.src = source;
+ sg.u.sg.grp = group;
+
if (PIM_DEBUG_PIM_TRACE) {
char up_str[100];
- char src_str[100];
- char grp_str[100];
char neigh_str[100];
pim_inet4_dump("<upstream?>", upstream, up_str, sizeof(up_str));
- pim_inet4_dump("<src?>", source, src_str, sizeof(src_str));
- pim_inet4_dump("<grp?>", group, grp_str, sizeof(grp_str));
pim_inet4_dump("<neigh?>", neigh->source_addr, neigh_str, sizeof(neigh_str));
- zlog_warn("%s: prune (S,G)=(%s,%s) rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
+ zlog_warn("%s: prune (S,G)=%s rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
__PRETTY_FUNCTION__,
- src_str, grp_str,
+ pim_str_sg_dump (&sg),
source_flags & PIM_RPT_BIT_MASK,
source_flags & PIM_WILDCARD_BIT_MASK,
up_str, holdtime, neigh_str, ifp->name);
}
- pim_ifchannel_prune(ifp, upstream, source, group, source_flags, holdtime);
+ pim_ifchannel_prune(ifp, upstream, &sg, source_flags, holdtime);
}
int pim_joinprune_recv(struct interface *ifp,