Skip to content

Commit

Permalink
ospf6d: spf calculation w/ multiple router lsas
Browse files Browse the repository at this point in the history
An OSPFv3 enabled Router can originate or receive
multiple Link State-IDs for Router LSAs.
As per RFC 5340 A 4.3, more than one Router LSAs,
from given Vertex is considered (as concatenated)
single large Router LSA.

Created hidden show command to simulate concatenated
large LSA from advertising/self Router LSAs.

Ticket:CM-19329
Reviewed By:
Testing Done:
Simulate 160 subinterfaces between R1 === R2--R3,
This triggers R1 and R2 to generate multiple link state
IDs for Router LSAs. During SPF calculation only aggregated
single router LSA processed and SPF tree formed.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
  • Loading branch information
chiragshah6 committed Jan 23, 2018
1 parent c192736 commit da086a3
Show file tree
Hide file tree
Showing 7 changed files with 266 additions and 143 deletions.
2 changes: 2 additions & 0 deletions ospf6d/ospf6_area.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ struct ospf6_area *ospf6_area_create(u_int32_t area_id, struct ospf6 *o, int df)
oa->lsdb->hook_add = ospf6_area_lsdb_hook_add;
oa->lsdb->hook_remove = ospf6_area_lsdb_hook_remove;
oa->lsdb_self = ospf6_lsdb_create(oa);
oa->temp_router_lsa_lsdb = ospf6_lsdb_create(oa);

oa->spf_table = OSPF6_ROUTE_TABLE_CREATE(AREA, SPF_RESULTS);
oa->spf_table->scope = oa;
Expand Down Expand Up @@ -279,6 +280,7 @@ void ospf6_area_delete(struct ospf6_area *oa)

ospf6_lsdb_delete(oa->lsdb);
ospf6_lsdb_delete(oa->lsdb_self);
ospf6_lsdb_delete(oa->temp_router_lsa_lsdb);

ospf6_spf_table_finish(oa->spf_table);
ospf6_route_table_delete(oa->spf_table);
Expand Down
1 change: 1 addition & 0 deletions ospf6d/ospf6_area.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ struct ospf6_area {

struct ospf6_lsdb *lsdb;
struct ospf6_lsdb *lsdb_self;
struct ospf6_lsdb *temp_router_lsa_lsdb;

struct ospf6_route_table *spf_table;
struct ospf6_route_table *route_table;
Expand Down
2 changes: 1 addition & 1 deletion ospf6d/ospf6_lsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ int ospf6_lsa_is_changed(struct ospf6_lsa *lsa1, struct ospf6_lsa *lsa2)

/* ospf6 age functions */
/* calculate birth */
static void ospf6_lsa_age_set(struct ospf6_lsa *lsa)
void ospf6_lsa_age_set(struct ospf6_lsa *lsa)
{
struct timeval now;

Expand Down
1 change: 1 addition & 0 deletions ospf6d/ospf6_lsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,5 +252,6 @@ extern void ospf6_lsa_terminate(void);

extern int config_write_ospf6_debug_lsa(struct vty *vty);
extern void install_element_ospf6_debug_lsa(void);
extern void ospf6_lsa_age_set(struct ospf6_lsa *lsa);

#endif /* OSPF6_LSA_H */
Loading

0 comments on commit da086a3

Please sign in to comment.