mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 07:37:54 +00:00
Merge pull request #13612 from chiragshah6/fdev1
ospfd: fix interface param type update
This commit is contained in:
commit
609491fe0d
@ -1346,18 +1346,28 @@ static int ospf_ifp_create(struct interface *ifp)
|
||||
|
||||
if (IS_DEBUG_OSPF(zebra, ZEBRA_INTERFACE))
|
||||
zlog_debug(
|
||||
"Zebra: interface add %s vrf %s[%u] index %d flags %llx metric %d mtu %d speed %u",
|
||||
"Zebra: interface add %s vrf %s[%u] index %d flags %llx metric %d mtu %d speed %u status 0x%x",
|
||||
ifp->name, ifp->vrf->name, ifp->vrf->vrf_id,
|
||||
ifp->ifindex, (unsigned long long)ifp->flags,
|
||||
ifp->metric, ifp->mtu, ifp->speed);
|
||||
ifp->metric, ifp->mtu, ifp->speed, ifp->status);
|
||||
|
||||
assert(ifp->info);
|
||||
|
||||
oii = ifp->info;
|
||||
oii->curr_mtu = ifp->mtu;
|
||||
|
||||
if (IF_DEF_PARAMS(ifp)
|
||||
&& !OSPF_IF_PARAM_CONFIGURED(IF_DEF_PARAMS(ifp), type)) {
|
||||
/* Change ospf type param based on following
|
||||
* condition:
|
||||
* ospf type params is not set (first creation),
|
||||
* OR ospf param type is changed based on
|
||||
* link event, currently only handle for
|
||||
* loopback interface type, for other ospf interface,
|
||||
* type can be set from user config which needs to be
|
||||
* preserved.
|
||||
*/
|
||||
if (IF_DEF_PARAMS(ifp) &&
|
||||
(!OSPF_IF_PARAM_CONFIGURED(IF_DEF_PARAMS(ifp), type) ||
|
||||
if_is_loopback(ifp))) {
|
||||
SET_IF_PARAM(IF_DEF_PARAMS(ifp), type);
|
||||
IF_DEF_PARAMS(ifp)->type = ospf_default_iftype(ifp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user