mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 22:03:12 +00:00
zebra: On if down/addr-del, process kernel routes
Since we don't have a daemon who's job is to handle kernel routes and we don't get an explicit route delete anymore if nexthops become unreachable from the kernel, zebra must re-process kernel routes itself to make sure they are still valid. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
a8c427ee39
commit
2a18114787
@ -1104,6 +1104,14 @@ int netlink_interface_addr(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
NULL, ifa->ifa_prefixlen);
|
NULL, ifa->ifa_prefixlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Linux kernel does not send route delete on interface down/addr del
|
||||||
|
* so we have to re-process routes it owns (i.e. kernel routes)
|
||||||
|
*/
|
||||||
|
if (h->nlmsg_type != RTM_NEWADDR)
|
||||||
|
rib_update(RIB_UPDATE_KERNEL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1332,6 +1340,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
"Intf %s(%u) has gone DOWN",
|
"Intf %s(%u) has gone DOWN",
|
||||||
name, ifp->ifindex);
|
name, ifp->ifindex);
|
||||||
if_down(ifp);
|
if_down(ifp);
|
||||||
|
rib_update(RIB_UPDATE_KERNEL);
|
||||||
} else if (if_is_operative(ifp)) {
|
} else if (if_is_operative(ifp)) {
|
||||||
/* Must notify client daemons of new
|
/* Must notify client daemons of new
|
||||||
* interface status. */
|
* interface status. */
|
||||||
@ -1371,6 +1380,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
"Intf %s(%u) has gone DOWN",
|
"Intf %s(%u) has gone DOWN",
|
||||||
name, ifp->ifindex);
|
name, ifp->ifindex);
|
||||||
if_down(ifp);
|
if_down(ifp);
|
||||||
|
rib_update(RIB_UPDATE_KERNEL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user