From 2b4edba3ad8431f8bd8b7218e9f8a5a5e4ee18ac Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 7 Oct 2011 16:10:10 +0200 Subject: pingu_iface: support binding multiple ping hosts to same iface Add config option for executing actions when interface gateway goes up/down. Add config option for required hosts up per interface (defaults to 1) --- pingu_netlink.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pingu_netlink.c') diff --git a/pingu_netlink.c b/pingu_netlink.c index 212e8e9..b5e2dd7 100644 --- a/pingu_netlink.c +++ b/pingu_netlink.c @@ -360,7 +360,6 @@ static int add_nexthops(struct nlmsghdr *nlh, size_t nlh_size, struct rtnexthop *rtnh; struct pingu_iface *iface; struct pingu_route *route; - struct pingu_host *host; int count = 0; memset(buf, 0, sizeof(buf)); @@ -372,9 +371,8 @@ static int add_nexthops(struct nlmsghdr *nlh, size_t nlh_size, route = pingu_route_first_default(&iface->route_list); switch (action_type) { case RTM_NEWROUTE: - host = pingu_host_find_by_iface(iface); if ((!iface->balance) || iface->index == 0 - || (host != NULL && host->status == PINGU_HOST_STATUS_OFFLINE) + || !pingu_iface_gw_is_online(iface) || route == NULL) { iface->has_multipath = 0; continue; -- cgit v1.2.3