summaryrefslogtreecommitdiff
path: root/pimd/pim_assert.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-08-02 04:38:11 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-21 20:26:05 -0500
commit4ed0af7013a8885e7c18d7ed532b16c5be5f2df9 (patch)
treefe7784732eff1c51ae06c5e52ebde044d489c516 /pimd/pim_assert.c
parentad6ec47b81a362ff1a2ef0a0c16d69401c2cc376 (diff)
lib, pimd: Fix borked up prefix code
Fix the struct prefix to be an actual struct prefix_sg. This cleans up a bunch of code to make it look nicer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_assert.c')
-rw-r--r--pimd/pim_assert.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c
index 07f49c6adf..4443e4459a 100644
--- a/pimd/pim_assert.c
+++ b/pimd/pim_assert.c
@@ -145,11 +145,11 @@ static int dispatch_assert(struct interface *ifp,
struct pim_assert_metric recv_metric)
{
struct pim_ifchannel *ch;
- struct prefix sg;
+ struct prefix_sg sg;
- memset (&sg, 0, sizeof (struct prefix));
- sg.u.sg.src = source_addr;
- sg.u.sg.grp = group_addr;
+ memset (&sg, 0, sizeof (struct prefix_sg));
+ sg.src = source_addr;
+ sg.grp = group_addr;
ch = pim_ifchannel_add(ifp, &sg);
if (!ch) {
zlog_warn("%s: (S,G)=%s failure creating channel on interface %s",
@@ -443,7 +443,7 @@ static int pim_assert_do(struct pim_ifchannel *ch,
}
pim_msg_size = pim_assert_build_msg(pim_msg, sizeof(pim_msg), ifp,
- ch->sg.u.sg.grp, ch->sg.u.sg.src,
+ ch->sg.grp, ch->sg.src,
metric.metric_preference,
metric.route_metric,
metric.rpt_bit_flag);
@@ -504,7 +504,7 @@ static int pim_assert_cancel(struct pim_ifchannel *ch)
metric.rpt_bit_flag = 0;
metric.metric_preference = PIM_ASSERT_METRIC_PREFERENCE_MAX;
metric.route_metric = PIM_ASSERT_ROUTE_METRIC_MAX;
- metric.ip_address = ch->sg.u.sg.src;
+ metric.ip_address = ch->sg.src;
return pim_assert_do(ch, metric);
}