aboutsummaryrefslogtreecommitdiffstats
path: root/pingu_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'pingu_netlink.c')
-rw-r--r--pingu_netlink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pingu_netlink.c b/pingu_netlink.c
index 5c63a51..e9781fa 100644
--- a/pingu_netlink.c
+++ b/pingu_netlink.c
@@ -375,8 +375,10 @@ static int add_nexthops(struct nlmsghdr *nlh, size_t nlh_size,
host = pingu_host_find_by_iface(iface);
if ((!iface->balance) || iface->index == 0
|| (host != NULL && host->status == PINGU_HOST_STATUS_OFFLINE)
- || route == NULL)
+ || route == NULL) {
+ iface->has_multipath = 0;
continue;
+ }
iface->has_multipath = 1;
break;
case RTM_DELROUTE:
@@ -430,7 +432,7 @@ int netlink_route_multipath(struct netlink_fd *fd, int action_type,
count = add_nexthops(&req.nlh, sizeof(req), iface_list, action_type);
if (count == 0)
- return 0;
+ req.nlh.nlmsg_type = RTM_DELROUTE;
if (!netlink_talk(fd, &req.nlh, sizeof(req), &req.nlh))
return -1;