summaryrefslogtreecommitdiffstats
path: root/ripngd/ripng_zebra.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-03-22 04:37:24 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2020-03-24 12:51:41 +0100
commit26a3ffd60e437e66a0762c4f399eebf19ad84a4a (patch)
treef95029ad2fb8347f4d2171320eacfffb5af6e484 /ripngd/ripng_zebra.c
parentbgpd: Rework code to use `const struct prefix` (diff)
downloadfrr-26a3ffd60e437e66a0762c4f399eebf19ad84a4a.tar.xz
frr-26a3ffd60e437e66a0762c4f399eebf19ad84a4a.zip
bgpd, lib, ripngd: Add agg_node_get_prefix
Modify code to use lookup function agg_node_get_prefix() as the abstraction layer. When we rework bgp_node to bgp_dest this will allow us to greatly limit the amount of work needed to do that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ripngd/ripng_zebra.c')
-rw-r--r--ripngd/ripng_zebra.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index f9bd56d1d..baf7f0096 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -46,12 +46,13 @@ static void ripng_zebra_ipv6_send(struct ripng *ripng, struct agg_node *rp,
struct listnode *listnode = NULL;
struct ripng_info *rinfo = NULL;
int count = 0;
+ const struct prefix *p = agg_node_get_prefix(rp);
memset(&api, 0, sizeof(api));
api.vrf_id = ripng->vrf->vrf_id;
api.type = ZEBRA_ROUTE_RIPNG;
api.safi = SAFI_UNICAST;
- api.prefix = rp->p;
+ api.prefix = *p;
SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
for (ALL_LIST_ELEMENTS_RO(list, listnode, rinfo)) {
@@ -85,18 +86,17 @@ static void ripng_zebra_ipv6_send(struct ripng *ripng, struct agg_node *rp,
if (IS_RIPNG_DEBUG_ZEBRA) {
if (ripng->ecmp)
- zlog_debug("%s: %s/%d nexthops %d",
+ zlog_debug("%s: %pRN nexthops %d",
(cmd == ZEBRA_ROUTE_ADD)
? "Install into zebra"
: "Delete from zebra",
- inet6_ntoa(rp->p.u.prefix6), rp->p.prefixlen,
- count);
+ rp, count);
else
- zlog_debug(
- "%s: %s/%d",
- (cmd == ZEBRA_ROUTE_ADD) ? "Install into zebra"
- : "Delete from zebra",
- inet6_ntoa(rp->p.u.prefix6), rp->p.prefixlen);
+ zlog_debug("%s: %pRN",
+ (cmd == ZEBRA_ROUTE_ADD)
+ ? "Install into zebra"
+ : "Delete from zebra",
+ rp);
}
}