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);
}