diff options
author | Denis Ovsienko <infrastation@yandex.ru> | 2011-12-18 16:27:02 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2012-01-02 17:27:53 +0400 |
commit | 85136e904861775bdf6fbbbd4f0080f06e749bcb (patch) | |
tree | 5e8321c2ab0203e6dfc38d324db82d26c07a48a7 | |
parent | 7eed92b9653b09f064e827e887c29ee11122b4fe (diff) |
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
-rw-r--r-- | ospfd/ospf_abr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index def55f10..d06a34ad 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -384,7 +384,7 @@ ospf_abr_nssa_am_elected (struct ospf_area *area) if (best == NULL) best = &lsa->data->id; 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; } @@ -395,7 +395,7 @@ ospf_abr_nssa_am_elected (struct ospf_area *area) if (best == NULL) 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; else return 0; |