summaryrefslogtreecommitdiff
path: root/zebra/zebra_snmp.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-02-25 08:29:46 -0500
committerMark Stapp <mjs@voltanet.io>2020-02-27 15:49:31 -0500
commitc415d89528f5cd7128e5b4c4cd65cce01d64fc80 (patch)
treec7604b3cf422eec7f9edd464af522251b7a20d6a /zebra/zebra_snmp.c
parentc13bfa74357bdcb719a648b18019dd1151191c10 (diff)
zebra: Embed lib nexthop-group in zebra hash entry
Embed nexthop-group, which is just a pointer, in the zebra nexthop-hash-entry object, rather than mallocing one. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_snmp.c')
-rw-r--r--zebra/zebra_snmp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c
index 70bb6a14ca..5de45c0294 100644
--- a/zebra/zebra_snmp.c
+++ b/zebra/zebra_snmp.c
@@ -285,8 +285,8 @@ static void check_replace(struct route_node *np2, struct route_entry *re2,
return;
}
- if (in_addr_cmp((uint8_t *)&(*re)->nhe->nhg->nexthop->gate.ipv4,
- (uint8_t *)&re2->nhe->nhg->nexthop->gate.ipv4)
+ if (in_addr_cmp((uint8_t *)&(*re)->nhe->nhg.nexthop->gate.ipv4,
+ (uint8_t *)&re2->nhe->nhg.nexthop->gate.ipv4)
<= 0)
return;
@@ -372,7 +372,7 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
(uint8_t *)&dest)) {
RNODE_FOREACH_RE (*np, *re) {
if (!in_addr_cmp((uint8_t *)&(*re)->nhe
- ->nhg->nexthop
+ ->nhg.nexthop
->gate.ipv4,
(uint8_t *)&nexthop))
if (proto
@@ -407,7 +407,7 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
|| ((policy == policy2) && (proto == proto2)
&& (in_addr_cmp(
(uint8_t *)&re2->nhe
- ->nhg->nexthop->gate.ipv4,
+ ->nhg.nexthop->gate.ipv4,
(uint8_t *)&nexthop)
>= 0)))
check_replace(np2, re2, np, re);
@@ -432,7 +432,7 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
{
struct nexthop *nexthop;
- nexthop = (*re)->nhe->nhg->nexthop;
+ nexthop = (*re)->nhe->nhg.nexthop;
if (nexthop) {
pnt = (uint8_t *)&nexthop->gate.ipv4;
for (i = 0; i < 4; i++)
@@ -462,7 +462,7 @@ static uint8_t *ipFwTable(struct variable *v, oid objid[], size_t *objid_len,
if (!np)
return NULL;
- nexthop = re->nhe->nhg->nexthop;
+ nexthop = re->nhe->nhg.nexthop;
if (!nexthop)
return NULL;