diff options
author | Joakim Tjernlund <Joakim.Tjernlund@transmode.se> | 2009-08-07 13:48:15 +0200 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2009-08-28 13:29:38 +0200 |
commit | 5d8de93a84b2afc4202d3284eb9e57672e2551b3 (patch) | |
tree | 9a17c616907cd000efc46873994464409c575099 /ospfd/ospf_zebra.c | |
parent | all: check return value from daemon() call (diff) | |
download | frr-5d8de93a84b2afc4202d3284eb9e57672e2551b3.tar.xz frr-5d8de93a84b2afc4202d3284eb9e57672e2551b3.zip |
ospfd: Tighten up the connected check for redistribution
* ospf_zebra.c: (ospf_distribute_check_connected) check to make filter out
routes matching connected routes was matching against OSPF networks, which
can be far more general than the actual connected interfaces. Fix.
Diffstat (limited to 'ospfd/ospf_zebra.c')
-rw-r--r-- | ospfd/ospf_zebra.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 52b23fe83..6f0a71ff5 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -682,16 +682,13 @@ ospf_external_lsa_originate_check (struct ospf *ospf, int ospf_distribute_check_connected (struct ospf *ospf, struct external_info *ei) { - struct route_node *rn; + struct listnode *node; + struct ospf_interface *oi; - for (rn = route_top (ospf->networks); rn; rn = route_next (rn)) - if (rn->info != NULL) - if (prefix_match (&rn->p, (struct prefix *) &ei->p)) - { - route_unlock_node (rn); - return 0; - } + for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi)) + if (prefix_match (oi->address, (struct prefix *) &ei->p)) + return 0; return 1; } |