diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2011-12-06 14:46:42 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2011-12-06 15:02:52 +0400 |
commit | fb01f87f4f50744206222343a780721af19fe56c (patch) | |
tree | 3c425d161ddac2a24c2c2fec91e3e794163a8ffd | |
parent | b24b19f719fdd9c3d61a0c93552cd64d832d964c (diff) |
ospfd: avoid redundant lookup in ospf_redistribute_withdraw
The old algorithim looked up every node twice as it withdrew
the entry. It looks up entry once in redistribute_withdraw, then
looks it up again info_delete. Use result of first lookup
to do the free directly.
This may explain the slow performance observed in
https://bugzilla.vyatta.com/show_bug.cgi?id=4421
-rw-r--r-- | ospfd/ospf_asbr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c index c39efee1..a23b4f2b 100644 --- a/ospfd/ospf_asbr.c +++ b/ospfd/ospf_asbr.c @@ -284,6 +284,9 @@ ospf_redistribute_withdraw (struct ospf *ospf, u_char type) continue; ospf_external_lsa_flush (ospf, type, &ei->p, ei->ifindex /*, ei->nexthop */); - ospf_external_info_delete (type, ei->p); + + ospf_external_info_free (ei); + route_unlock_node (rn); + rn->info = NULL; } } |