mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-07 20:26:11 +00:00
Merge pull request #14465 from donaldsharp/zebra_snmp_coverity
zebra: Fix longstanding snmp coverity issue
This commit is contained in:
commit
629c47fcee
@ -353,7 +353,7 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
|
|||||||
if (policy) /* Not supported (yet?) */
|
if (policy) /* Not supported (yet?) */
|
||||||
return;
|
return;
|
||||||
for (*np = route_top(table); *np; *np = route_next(*np)) {
|
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)) {
|
(uint8_t *)&dest)) {
|
||||||
RNODE_FOREACH_RE (*np, *re) {
|
RNODE_FOREACH_RE (*np, *re) {
|
||||||
if (!in_addr_cmp((uint8_t *)&(*re)->nhe
|
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)) {
|
for (np2 = route_top(table); np2; np2 = route_next(np2)) {
|
||||||
|
|
||||||
/* Check destination first */
|
/* 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) {
|
RNODE_FOREACH_RE (np2, re2) {
|
||||||
check_replace(np2, re2, np, re);
|
check_replace(np2, re2, np, re);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_addr_cmp(&np2->p.u.prefix, (uint8_t *)&dest)
|
if (in_addr_cmp((uint8_t *)&np2->p.u.prefix4, (uint8_t *)&dest) ==
|
||||||
== 0) { /* have to look at each re individually */
|
0) { /* have to look at each re individually */
|
||||||
RNODE_FOREACH_RE (np2, re2) {
|
RNODE_FOREACH_RE (np2, re2) {
|
||||||
int proto2, policy2;
|
int proto2, policy2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user