#include "networkd-network.h"
#include "networkd-nexthop.h"
#include "networkd-queue.h"
+#include "networkd-route.h"
#include "networkd-route-util.h"
#include "parse-util.h"
#include "set.h"
assert(nexthop);
assert(manager);
- /* If a nexthop is removed, the kernel silently removes nexthops that depend on the
+ /* If a nexthop is removed, the kernel silently removes nexthops and routes that depend on the
* removed nexthop. Let's remove them for safety (though, they are already removed in the kernel,
* hence that should fail), and forget them. */
RET_GATHER(r, nexthop_remove(nh, manager));
}
+ Route *route;
+ SET_FOREACH(route, nexthop->routes)
+ RET_GATHER(r, route_remove(route, manager));
+
return r;
}