Fixes a bug related to implicit backbone on ABR.
This commit is contained in:
parent
c4443085a1
commit
5cdf264f93
3 changed files with 12 additions and 6 deletions
|
@ -205,6 +205,7 @@ ospf_start(struct proto *p)
|
||||||
oa = mb_allocz(p->pool, sizeof(struct ospf_area));
|
oa = mb_allocz(p->pool, sizeof(struct ospf_area));
|
||||||
add_tail(&po->area_list, NODE oa);
|
add_tail(&po->area_list, NODE oa);
|
||||||
po->areano++;
|
po->areano++;
|
||||||
|
oa->ac = NULL;
|
||||||
oa->stub = 0;
|
oa->stub = 0;
|
||||||
oa->areaid = 0;
|
oa->areaid = 0;
|
||||||
oa->rt = NULL;
|
oa->rt = NULL;
|
||||||
|
|
|
@ -701,7 +701,7 @@ struct ospf_area
|
||||||
{
|
{
|
||||||
node n;
|
node n;
|
||||||
u32 areaid;
|
u32 areaid;
|
||||||
struct ospf_area_config *ac; /* Related area config */
|
struct ospf_area_config *ac; /* Related area config, might be NULL */
|
||||||
int origrt; /* Rt lsa origination scheduled? */
|
int origrt; /* Rt lsa origination scheduled? */
|
||||||
struct top_hash_entry *rt; /* My own router LSA */
|
struct top_hash_entry *rt; /* My own router LSA */
|
||||||
struct top_hash_entry *pxr_lsa; /* Originated prefix LSA */
|
struct top_hash_entry *pxr_lsa; /* Originated prefix LSA */
|
||||||
|
|
|
@ -157,6 +157,9 @@ get_seqnum(struct top_hash_entry *en)
|
||||||
static int
|
static int
|
||||||
configured_stubnet(struct ospf_area *oa, struct ifa *a)
|
configured_stubnet(struct ospf_area *oa, struct ifa *a)
|
||||||
{
|
{
|
||||||
|
if (!oa->ac)
|
||||||
|
return 0;
|
||||||
|
|
||||||
struct ospf_stubnet_config *sn;
|
struct ospf_stubnet_config *sn;
|
||||||
WALK_LIST(sn, oa->ac->stubnet_list)
|
WALK_LIST(sn, oa->ac->stubnet_list)
|
||||||
{
|
{
|
||||||
|
@ -309,6 +312,7 @@ originate_rt_lsa_body(struct ospf_area *oa, u16 *length)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ospf_stubnet_config *sn;
|
struct ospf_stubnet_config *sn;
|
||||||
|
if (oa->ac)
|
||||||
WALK_LIST(sn, oa->ac->stubnet_list)
|
WALK_LIST(sn, oa->ac->stubnet_list)
|
||||||
if (!sn->hidden)
|
if (!sn->hidden)
|
||||||
{
|
{
|
||||||
|
@ -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,
|
/* If there are some configured vlinks, add some global address,
|
||||||
which will be used as a vlink endpoint. */
|
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)),
|
put_ipv6_prefix(lsab_alloc(po, IPV6_PREFIX_SPACE(MAX_PREFIX_LENGTH)),
|
||||||
vlink_addr->ip, MAX_PREFIX_LENGTH, OPT_PX_LA, 0);
|
vlink_addr->ip, MAX_PREFIX_LENGTH, OPT_PX_LA, 0);
|
||||||
|
@ -1205,6 +1209,7 @@ originate_prefix_rt_lsa_body(struct ospf_area *oa, u16 *length)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ospf_stubnet_config *sn;
|
struct ospf_stubnet_config *sn;
|
||||||
|
if (oa->ac)
|
||||||
WALK_LIST(sn, oa->ac->stubnet_list)
|
WALK_LIST(sn, oa->ac->stubnet_list)
|
||||||
if (!sn->hidden)
|
if (!sn->hidden)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue