summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_snmp.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2019-11-22 21:30:53 +0100
committerMark Stapp <mjs@voltanet.io>2019-12-04 14:13:52 +0100
commit0eb97b860dc94329cf9add9f8f3d3a2c7f539568 (patch)
tree4382d83b863bbec02b3df6adf9060e7686a7a814 /zebra/zebra_snmp.c
parentlib: add some nexthop ctors (diff)
downloadfrr-0eb97b860dc94329cf9add9f8f3d3a2c7f539568.tar.xz
frr-0eb97b860dc94329cf9add9f8f3d3a2c7f539568.zip
lib,zebra: use nhg_hash_entry pointer in route_entry
Replace the existing list of nexthops (via a nexthop_group struct) in the route_entry with a direct pointer to zebra's new shared group (from zebra_nhg.h). This allows more direct access to that shared group and the info it carries. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_snmp.c')
-rw-r--r--zebra/zebra_snmp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c
index 56c766432..4c5265198 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)->ng->nexthop->gate.ipv4,
- (uint8_t *)&re2->ng->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;
@@ -371,9 +371,9 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
if (!in_addr_cmp(&(*np)->p.u.prefix,
(uint8_t *)&dest)) {
RNODE_FOREACH_RE (*np, *re) {
- if (!in_addr_cmp((uint8_t *)&(*re)
- ->ng->nexthop
- ->gate.ipv4,
+ if (!in_addr_cmp((uint8_t *)&(*re)->nhe
+ ->nhg->nexthop
+ ->gate.ipv4,
(uint8_t *)&nexthop))
if (proto
== proto_trans((*re)->type))
@@ -406,8 +406,8 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
|| ((policy == policy2) && (proto < proto2))
|| ((policy == policy2) && (proto == proto2)
&& (in_addr_cmp(
- (uint8_t *)&re2->ng->nexthop
- ->gate.ipv4,
+ (uint8_t *)&re2->nhe
+ ->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)->ng->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->ng->nexthop;
+ nexthop = re->nhe->nhg->nexthop;
if (!nexthop)
return NULL;