mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-30 12:01:43 +00:00
ospfd: fix bug in NSSA ABR status check
* ospf_abr.c * ospf_abr_nssa_am_elected(): feed "best" instead of "address of best" into IPV4_ADDR_CMP(), because "best" is a pointer; also, mean s_addr field of the structures to get better typed pointers
This commit is contained in:
parent
fe40bfa2e1
commit
4e677f52db
@ -384,7 +384,7 @@ ospf_abr_nssa_am_elected (struct ospf_area *area)
|
|||||||
if (best == NULL)
|
if (best == NULL)
|
||||||
best = &lsa->data->id;
|
best = &lsa->data->id;
|
||||||
else
|
else
|
||||||
if ( IPV4_ADDR_CMP (&best, &lsa->data->id) < 0)
|
if (IPV4_ADDR_CMP (&best->s_addr, &lsa->data->id.s_addr) < 0)
|
||||||
best = &lsa->data->id;
|
best = &lsa->data->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -395,7 +395,7 @@ ospf_abr_nssa_am_elected (struct ospf_area *area)
|
|||||||
if (best == NULL)
|
if (best == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if ( IPV4_ADDR_CMP (&best, &area->ospf->router_id) < 0)
|
if (IPV4_ADDR_CMP (&best->s_addr, &area->ospf->router_id.s_addr) < 0)
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user