Merge pull request #11004 from volodymyrhuti/master

zebra: set ZEBRA_IFC_DOWN on connected routes for inactive interfaces
This commit is contained in:
Donald Sharp 2022-04-19 18:36:52 -04:00 committed by GitHub
commit 945f6ce22c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -327,6 +327,8 @@ void connected_add_ipv4(struct interface *ifp, int flags,
/* If we get a notification from the kernel,
* we can safely assume the address is known to the kernel */
SET_FLAG(ifc->conf, ZEBRA_IFC_QUEUED);
if (!if_is_operative(ifp))
SET_FLAG(ifc->conf, ZEBRA_IFC_DOWN);
/* Allocate new connected address. */
p = prefix_ipv4_new();
@ -548,6 +550,8 @@ void connected_add_ipv6(struct interface *ifp, int flags,
/* If we get a notification from the kernel,
* we can safely assume the address is known to the kernel */
SET_FLAG(ifc->conf, ZEBRA_IFC_QUEUED);
if (!if_is_operative(ifp))
SET_FLAG(ifc->conf, ZEBRA_IFC_DOWN);
/* Allocate new connected address. */
p = prefix_ipv6_new();