summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zebra/if_netlink.c5
-rw-r--r--zebra/interface.c9
-rw-r--r--zebra/interface.h2
-rw-r--r--zebra/zebra_ptm.c6
4 files changed, 12 insertions, 10 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index 42e55acb51..a75b165270 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -1920,6 +1920,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
}
if (if_is_no_ptm_operative(ifp)) {
+ bool is_up = if_is_operative(ifp);
ifp->flags = ifi->ifi_flags & 0x0000fffff;
if (!if_is_no_ptm_operative(ifp) ||
CHECK_FLAG(zif->flags,
@@ -1939,7 +1940,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
zlog_debug(
"Intf %s(%u) PTM up, notifying clients",
name, ifp->ifindex);
- if_up(ifp);
+ if_up(ifp, !is_up);
/* Update EVPN VNI when SVI MAC change
*/
@@ -1975,7 +1976,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
zlog_debug(
"Intf %s(%u) has come UP",
name, ifp->ifindex);
- if_up(ifp);
+ if_up(ifp, true);
if (IS_ZEBRA_IF_BRIDGE(ifp))
chgflags =
ZEBRA_BRIDGE_MASTER_UP;
diff --git a/zebra/interface.c b/zebra/interface.c
index fbd2aac005..12c073144c 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -517,7 +517,7 @@ void if_flags_update(struct interface *ifp, uint64_t newflags)
/* inoperative -> operative? */
ifp->flags = newflags;
if (if_is_operative(ifp))
- if_up(ifp);
+ if_up(ifp, true);
}
}
@@ -1045,7 +1045,7 @@ bool if_nhg_dependents_is_empty(const struct interface *ifp)
}
/* Interface is up. */
-void if_up(struct interface *ifp)
+void if_up(struct interface *ifp, bool install_connected)
{
struct zebra_if *zif;
struct interface *link_if;
@@ -1077,7 +1077,8 @@ void if_up(struct interface *ifp)
#endif
/* Install connected routes to the kernel. */
- if_install_connected(ifp);
+ if (install_connected)
+ if_install_connected(ifp);
/* Handle interface up for specific types for EVPN. Non-VxLAN interfaces
* are checked to see if (remote) neighbor entries need to be installed
@@ -2778,7 +2779,7 @@ int if_linkdetect(struct interface *ifp, bool detect)
/* Interface may come up after disabling link detection */
if (if_is_operative(ifp) && !if_was_operative)
- if_up(ifp);
+ if_up(ifp, true);
}
/* FIXME: Will defer status change forwarding if interface
does not come down! */
diff --git a/zebra/interface.h b/zebra/interface.h
index c19e494860..315a3170d8 100644
--- a/zebra/interface.h
+++ b/zebra/interface.h
@@ -486,7 +486,7 @@ extern void if_nbr_ipv6ll_to_ipv4ll_neigh_update(struct interface *ifp,
extern void if_nbr_ipv6ll_to_ipv4ll_neigh_del_all(struct interface *ifp);
extern void if_delete_update(struct interface *ifp);
extern void if_add_update(struct interface *ifp);
-extern void if_up(struct interface *);
+extern void if_up(struct interface *ifp, bool install_connected);
extern void if_down(struct interface *);
extern void if_refresh(struct interface *);
extern void if_flags_update(struct interface *, uint64_t);
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c
index 68e5c391cf..c28e251e3a 100644
--- a/zebra/zebra_ptm.c
+++ b/zebra/zebra_ptm.c
@@ -350,7 +350,7 @@ DEFUN (no_zebra_ptm_enable_if,
if (IS_ZEBRA_DEBUG_EVENT)
zlog_debug("%s: Bringing up interface %s",
__func__, ifp->name);
- if_up(ifp);
+ if_up(ifp, true);
}
}
@@ -553,7 +553,7 @@ static int zebra_ptm_handle_cbl_msg(void *arg, void *in_ctxt,
ifp->ptm_status = ZEBRA_PTM_STATUS_UP;
if (ifp->ptm_enable && if_is_no_ptm_operative(ifp)
&& send_linkup)
- if_up(ifp);
+ if_up(ifp, true);
} else if (!strcmp(cbl_str, ZEBRA_PTM_FAIL_STR)
&& (ifp->ptm_status != ZEBRA_PTM_STATUS_DOWN)) {
ifp->ptm_status = ZEBRA_PTM_STATUS_DOWN;
@@ -1163,7 +1163,7 @@ void zebra_ptm_reset_status(int ptm_disable)
zlog_debug(
"%s: Bringing up interface %s",
__func__, ifp->name);
- if_up(ifp);
+ if_up(ifp, true);
}
}
}