summaryrefslogtreecommitdiffstats
path: root/proto/ospf/topology.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-11-10 16:43:11 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-11-10 16:43:11 +0100
commit5cdf264f937687aff194574f5fe2badb087337b8 (patch)
treebcb0cf3f701d2abbe350a811f1f32448d8eeedf0 /proto/ospf/topology.c
parentc4443085a198c26a478463429477e7e8a599fa07 (diff)
downloadbird-5cdf264f937687aff194574f5fe2badb087337b8.tar
bird-5cdf264f937687aff194574f5fe2badb087337b8.zip
Fixes a bug related to implicit backbone on ABR.
Diffstat (limited to 'proto/ospf/topology.c')
-rw-r--r--proto/ospf/topology.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c
index 16a0667..1ea1df1 100644
--- a/proto/ospf/topology.c
+++ b/proto/ospf/topology.c
@@ -157,6 +157,9 @@ get_seqnum(struct top_hash_entry *en)
static int
configured_stubnet(struct ospf_area *oa, struct ifa *a)
{
+ if (!oa->ac)
+ return 0;
+
struct ospf_stubnet_config *sn;
WALK_LIST(sn, oa->ac->stubnet_list)
{
@@ -309,8 +312,9 @@ originate_rt_lsa_body(struct ospf_area *oa, u16 *length)
}
struct ospf_stubnet_config *sn;
- WALK_LIST(sn, oa->ac->stubnet_list)
- if (!sn->hidden)
+ if (oa->ac)
+ WALK_LIST(sn, oa->ac->stubnet_list)
+ if (!sn->hidden)
{
ln = lsab_alloc(po, sizeof(struct ospf_lsa_rt_link));
ln->type = LSART_STUB;
@@ -1197,7 +1201,7 @@ originate_prefix_rt_lsa_body(struct ospf_area *oa, u16 *length)
/* If there are some configured vlinks, add some global address,
which will be used as a vlink endpoint. */
- if (!EMPTY_LIST(oa->ac->vlink_list) && !host_addr && vlink_addr)
+ if (oa->ac && !EMPTY_LIST(oa->ac->vlink_list) && !host_addr && vlink_addr)
{
put_ipv6_prefix(lsab_alloc(po, IPV6_PREFIX_SPACE(MAX_PREFIX_LENGTH)),
vlink_addr->ip, MAX_PREFIX_LENGTH, OPT_PX_LA, 0);
@@ -1205,8 +1209,9 @@ originate_prefix_rt_lsa_body(struct ospf_area *oa, u16 *length)
}
struct ospf_stubnet_config *sn;
- WALK_LIST(sn, oa->ac->stubnet_list)
- if (!sn->hidden)
+ if (oa->ac)
+ WALK_LIST(sn, oa->ac->stubnet_list)
+ if (!sn->hidden)
{
flags = (sn->px.len < MAX_PREFIX_LENGTH) ? 0 : OPT_PX_LA;
put_ipv6_prefix(lsab_alloc(po, IPV6_PREFIX_SPACE(sn->px.len)),