diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-03-14 16:36:59 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-03-14 16:36:59 +0100 |
commit | 0aad2b9292f8e5ff32d048378faf80d2d0bfbb80 (patch) | |
tree | e245c5adb1392fee5d402b25823b558969f9cd13 /proto/ospf/topology.c | |
parent | 54305181f6ee3af57dd3d15d53ea2e851b36ed23 (diff) | |
download | bird-0aad2b9292f8e5ff32d048378faf80d2d0bfbb80.tar bird-0aad2b9292f8e5ff32d048378faf80d2d0bfbb80.zip |
Temporary OSPF commit - sockets.
Diffstat (limited to 'proto/ospf/topology.c')
-rw-r--r-- | proto/ospf/topology.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index bff9b2e..885c39b 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -272,24 +272,20 @@ originate_rt_lsa_body(struct ospf_area *oa, u16 *length) break; } - /* Now we will originate stub areas for interfaces addresses */ - struct ifa *a; - WALK_LIST(a, ifa->iface->addrs) - { - if (((a == ifa->addr) && net_lsa) || - (a->flags & IA_SECONDARY) || - (a->flags & IA_UNNUMBERED) || - configured_stubnet(oa, a)) - continue; + /* Now we will originate stub area if there is no primary */ + if (net_lsa || + (ifa->type == OSPF_IT_VLINK) || + (ifa->addr->flags & IA_UNNUMBERED) || + configured_stubnet(oa, ifa->addr)) + continue; - ln = lsab_alloc(po, sizeof(struct ospf_lsa_rt_link)); - ln->type = LSART_STUB; - ln->id = ipa_to_u32(a->prefix); - ln->data = ipa_to_u32(ipa_mkmask(a->pxlen)); - ln->metric = ifa->cost; - ln->padding = 0; - i++; - } + ln = lsab_alloc(po, sizeof(struct ospf_lsa_rt_link)); + ln->type = LSART_STUB; + ln->id = ipa_to_u32(ifa->addr->prefix); + ln->data = ipa_to_u32(ipa_mkmask(ifa->addr->pxlen)); + ln->metric = ifa->cost; + ln->padding = 0; + i++; } struct ospf_stubnet_config *sn; @@ -898,6 +894,7 @@ originate_ext_lsa_body(net *n, rte *e, u16 *length, struct proto_ospf *po, int gw = 0; int size = sizeof(struct ospf_lsa_ext); + // FIXME check for gw should be per ifa, not per iface if ((e->attrs->dest == RTD_ROUTER) && !ipa_equal(e->attrs->gw, IPA_NONE) && !ipa_has_link_scope(e->attrs->gw) && |