summaryrefslogtreecommitdiffstats
path: root/pimd/pim_assert.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetwroks.com>2016-07-23 05:12:06 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-22 02:26:03 +0100
commit5074a4230a11607b837fe07c7419ce5b3275f942 (patch)
tree6f09e867e55721c9331b80a51e1ce867daf42e88 /pimd/pim_assert.c
parentpimd: Refactor s,g information to struct prefix in pim_upstream.h (diff)
downloadfrr-5074a4230a11607b837fe07c7419ce5b3275f942.tar.xz
frr-5074a4230a11607b837fe07c7419ce5b3275f942.zip
pimd: more source,group conversion to prefix sg
Convert more of the code to pass around a 'struct prefix sg' instead of individual struct addr's. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_assert.c')
-rw-r--r--pimd/pim_assert.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c
index 63f4e3386..e8e3549d2 100644
--- a/pimd/pim_assert.c
+++ b/pimd/pim_assert.c
@@ -146,16 +146,16 @@ static int dispatch_assert(struct interface *ifp,
struct pim_assert_metric recv_metric)
{
struct pim_ifchannel *ch;
+ struct prefix sg;
- ch = pim_ifchannel_add(ifp, source_addr, group_addr);
+ memset (&sg, 0, sizeof (struct prefix));
+ sg.u.sg.src = source_addr;
+ sg.u.sg.grp = group_addr;
+ ch = pim_ifchannel_add(ifp, &sg);
if (!ch) {
- char source_str[100];
- char group_str[100];
- pim_inet4_dump("<src?>", source_addr, source_str, sizeof(source_str));
- pim_inet4_dump("<grp?>", group_addr, group_str, sizeof(group_str));
- zlog_warn("%s: (S,G)=(%s,%s) failure creating channel on interface %s",
+ zlog_warn("%s: (S,G)=%s failure creating channel on interface %s",
__PRETTY_FUNCTION__,
- source_str, group_str, ifp->name);
+ pim_str_sg_dump (&sg), ifp->name);
return -1;
}
@@ -212,13 +212,9 @@ static int dispatch_assert(struct interface *ifp,
break;
default:
{
- char source_str[100];
- char group_str[100];
- pim_inet4_dump("<src?>", source_addr, source_str, sizeof(source_str));
- pim_inet4_dump("<grp?>", group_addr, group_str, sizeof(group_str));
- zlog_warn("%s: (S,G)=(%s,%s) invalid assert state %d on interface %s",
+ zlog_warn("%s: (S,G)=%s invalid assert state %d on interface %s",
__PRETTY_FUNCTION__,
- source_str, group_str, ch->ifassert_state, ifp->name);
+ pim_str_sg_dump (&sg), ch->ifassert_state, ifp->name);
}
return -2;
}