mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 15:13:20 +00:00
ospf6: get instance from lsdb data
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
e285b70d3c
commit
f5f26b8fca
@ -68,7 +68,7 @@ extern void ospf6_abr_originate_summary(struct ospf6_route *route,
|
||||
struct ospf6 *ospf6);
|
||||
extern void ospf6_abr_examin_summary(struct ospf6_lsa *lsa,
|
||||
struct ospf6_area *oa);
|
||||
extern void ospf6_abr_defaults_to_stub(struct ospf6 *);
|
||||
extern void ospf6_abr_defaults_to_stub(struct ospf6 *ospf6);
|
||||
extern void ospf6_abr_examin_brouter(uint32_t router_id,
|
||||
struct ospf6_route *route,
|
||||
struct ospf6 *ospf6);
|
||||
|
@ -442,12 +442,13 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,
|
||||
}
|
||||
}
|
||||
|
||||
void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa, struct ospf6 *ospf6)
|
||||
void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa)
|
||||
{
|
||||
struct ospf6_as_external_lsa *external;
|
||||
struct prefix asbr_id;
|
||||
struct ospf6_route *asbr_entry, *route, *old;
|
||||
struct ospf6_path *path;
|
||||
struct ospf6 *ospf6;
|
||||
|
||||
external = (struct ospf6_as_external_lsa *)OSPF6_LSA_HEADER_END(
|
||||
lsa->header);
|
||||
@ -455,6 +456,8 @@ void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa, struct ospf6 *ospf6)
|
||||
if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL))
|
||||
zlog_debug("Calculate AS-External route for %s", lsa->name);
|
||||
|
||||
ospf6 = ospf6_get_by_lsdb(lsa);
|
||||
|
||||
if (lsa->header->adv_router == ospf6->router_id) {
|
||||
if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL))
|
||||
zlog_debug("Ignore self-originated AS-External-LSA");
|
||||
@ -822,7 +825,7 @@ void ospf6_asbr_lsentry_add(struct ospf6_route *asbr_entry, struct ospf6 *ospf6)
|
||||
router = ospf6_linkstate_prefix_adv_router(&asbr_entry->prefix);
|
||||
for (ALL_LSDB_TYPED_ADVRTR(ospf6->lsdb, type, router, lsa)) {
|
||||
if (!OSPF6_LSA_IS_MAXAGE(lsa))
|
||||
ospf6_asbr_lsa_add(lsa, ospf6);
|
||||
ospf6_asbr_lsa_add(lsa);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ struct ospf6_as_external_lsa {
|
||||
(E)->bits_metric |= htonl(0x00ffffff) & htonl(C); \
|
||||
}
|
||||
|
||||
extern void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa, struct ospf6 *ospf6);
|
||||
extern void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa);
|
||||
extern void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
|
||||
struct ospf6_route *asbr_entry);
|
||||
extern void ospf6_asbr_lsentry_add(struct ospf6_route *asbr_entry,
|
||||
|
@ -124,12 +124,9 @@ struct ospf6 *ospf6_lookup_by_vrf_name(const char *name)
|
||||
|
||||
static void ospf6_top_lsdb_hook_add(struct ospf6_lsa *lsa)
|
||||
{
|
||||
struct ospf6 *ospf6 = NULL;
|
||||
|
||||
switch (ntohs(lsa->header->type)) {
|
||||
case OSPF6_LSTYPE_AS_EXTERNAL:
|
||||
ospf6 = ospf6_get_by_lsdb(lsa);
|
||||
ospf6_asbr_lsa_add(lsa, ospf6);
|
||||
ospf6_asbr_lsa_add(lsa);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user