summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Stapp <mjs.ietf@gmail.com>2023-09-21 19:21:10 +0200
committerGitHub <noreply@github.com>2023-09-21 19:21:10 +0200
commit629c47fcee9bb7a8ae171dcf9d72839c7606cb8c (patch)
treeac3d404d41a011cd54cd33e45a5b9c5dcb093b9f
parentMerge pull request #14453 from pguibert6WIND/isis_startup_crash (diff)
parentzebra: Fix longstanding snmp coverity issue (diff)
downloadfrr-629c47fcee9bb7a8ae171dcf9d72839c7606cb8c.tar.xz
frr-629c47fcee9bb7a8ae171dcf9d72839c7606cb8c.zip
Merge pull request #14465 from donaldsharp/zebra_snmp_coverity
zebra: Fix longstanding snmp coverity issue
-rw-r--r--zebra/zebra_snmp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c
index e06733cb8..8cab18495 100644
--- a/zebra/zebra_snmp.c
+++ b/zebra/zebra_snmp.c
@@ -353,7 +353,7 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
if (policy) /* Not supported (yet?) */
return;
for (*np = route_top(table); *np; *np = route_next(*np)) {
- if (!in_addr_cmp(&(*np)->p.u.prefix,
+ if (!in_addr_cmp((uint8_t *)&(*np)->p.u.prefix4,
(uint8_t *)&dest)) {
RNODE_FOREACH_RE (*np, *re) {
if (!in_addr_cmp((uint8_t *)&(*re)->nhe
@@ -374,13 +374,14 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
for (np2 = route_top(table); np2; np2 = route_next(np2)) {
/* Check destination first */
- if (in_addr_cmp(&np2->p.u.prefix, (uint8_t *)&dest) > 0)
+ if (in_addr_cmp((uint8_t *)&np2->p.u.prefix4,
+ (uint8_t *)&dest) > 0)
RNODE_FOREACH_RE (np2, re2) {
check_replace(np2, re2, np, re);
}
- if (in_addr_cmp(&np2->p.u.prefix, (uint8_t *)&dest)
- == 0) { /* have to look at each re individually */
+ if (in_addr_cmp((uint8_t *)&np2->p.u.prefix4, (uint8_t *)&dest) ==
+ 0) { /* have to look at each re individually */
RNODE_FOREACH_RE (np2, re2) {
int proto2, policy2;