mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 11:18:52 +00:00
Merge pull request #8557 from rgirada/ospf_type5_fix
ospfd: External lsa handling in opaque capabilities enable/disable
This commit is contained in:
commit
d550a64cd0
@ -2084,6 +2084,8 @@ void ospf_external_lsa_rid_change(struct ospf *ospf)
|
|||||||
{
|
{
|
||||||
struct external_info *ei;
|
struct external_info *ei;
|
||||||
struct ospf_external_aggr_rt *aggr;
|
struct ospf_external_aggr_rt *aggr;
|
||||||
|
struct ospf_lsa *lsa = NULL;
|
||||||
|
int force;
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
|
for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
|
||||||
@ -2115,24 +2117,48 @@ void ospf_external_lsa_rid_change(struct ospf *ospf)
|
|||||||
(struct prefix_ipv4 *)&ei->p))
|
(struct prefix_ipv4 *)&ei->p))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!ospf_redistribute_check(ospf, ei, NULL))
|
lsa = ospf_external_info_find_lsa(ospf, &ei->p);
|
||||||
continue;
|
|
||||||
|
|
||||||
aggr = ospf_external_aggr_match(ospf, &ei->p);
|
aggr = ospf_external_aggr_match(ospf, &ei->p);
|
||||||
if (aggr) {
|
if (aggr) {
|
||||||
|
|
||||||
|
if (!ospf_redistribute_check(ospf, ei,
|
||||||
|
NULL))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR))
|
if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR))
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"Originate Summary LSA after reset/router-ID change");
|
"Originate Summary LSA after reset/router-ID change");
|
||||||
|
|
||||||
/* Here the LSA is originated as new */
|
/* Here the LSA is originated as new */
|
||||||
ospf_originate_summary_lsa(ospf, aggr,
|
ospf_originate_summary_lsa(ospf, aggr,
|
||||||
ei);
|
ei);
|
||||||
} else if (!ospf_external_lsa_originate(ospf,
|
} else if (lsa) {
|
||||||
ei))
|
/* LSA needs to be refreshed even if
|
||||||
flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
|
* there is no change in the route
|
||||||
|
* params if the LSA is in maxage.
|
||||||
|
*/
|
||||||
|
if (IS_LSA_MAXAGE(lsa))
|
||||||
|
force = LSA_REFRESH_FORCE;
|
||||||
|
else
|
||||||
|
force = LSA_REFRESH_IF_CHANGED;
|
||||||
|
|
||||||
|
ospf_external_lsa_refresh(ospf, lsa,
|
||||||
|
ei, force, 0);
|
||||||
|
} else {
|
||||||
|
if (!ospf_redistribute_check(ospf, ei,
|
||||||
|
NULL))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!ospf_external_lsa_originate(ospf,
|
||||||
|
NULL))
|
||||||
|
flog_warn(
|
||||||
|
EC_OSPF_LSA_INSTALL_FAILURE,
|
||||||
"LSA: AS-external-LSA was not originated.");
|
"LSA: AS-external-LSA was not originated.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ei = ospf_default_external_info(ospf);
|
ei = ospf_default_external_info(ospf);
|
||||||
if (ei && !ospf_external_lsa_originate(ospf, ei)) {
|
if (ei && !ospf_external_lsa_originate(ospf, ei)) {
|
||||||
|
@ -407,6 +407,9 @@ void ospf_renegotiate_optional_capabilities(struct ospf *top)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Refresh/Re-originate external LSAs (Type-7 and Type-5).*/
|
||||||
|
ospf_external_lsa_rid_change(top);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user