summaryrefslogtreecommitdiff
path: root/ospfd/ospf_lsa.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-05-12 22:55:41 +0000
committerPaul Jakma <paul.jakma@sun.com>2006-05-12 22:55:41 +0000
commit4021b60aad57f71f5d3d5c105127f93bd77bf800 (patch)
tree810783e34d8cb8e573fd4773ab6d7b955c84a4f2 /ospfd/ospf_lsa.c
parent214a4454376e8c96990e4c2ee6edea891c1f3166 (diff)
[ospfd] Squash another ospf_lookup call
2006-05-11 Paul Jakma <paul.jakma@sun.com> * ospf_lsa.c: (ospf_default_originate_timer) Let the thread take (struct ospf *) as thread argument, rather than (struct ospf *)->default_originate, thus avoiding having to call ospf_lookup. * ospf_zebra.c: (ospf_redistribute_default_set) change setup of ospf_default_originate_timer thread to match. * ospfd.c: (ospf_router_id_update) ditto.
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r--ospfd/ospf_lsa.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index faae4376..9a887459 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -2243,22 +2243,18 @@ ospf_default_external_info (struct ospf *ospf)
int
ospf_default_originate_timer (struct thread *thread)
{
- int *origin;
struct prefix_ipv4 p;
struct in_addr nexthop;
struct external_info *ei;
struct ospf *ospf;
- ospf = ospf_lookup ();
-
- /* Get originate flags. */
- origin = THREAD_ARG (thread);
+ ospf = THREAD_ARG (thread);
p.family = AF_INET;
p.prefix.s_addr = 0;
p.prefixlen = 0;
- if (*origin == DEFAULT_ORIGINATE_ALWAYS)
+ if (ospf->default_originate == DEFAULT_ORIGINATE_ALWAYS)
{
/* If there is no default route via redistribute,
then originate AS-external-LSA with nexthop 0 (self). */