aboutsummaryrefslogtreecommitdiffstats
path: root/pingu_netlink.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-07 16:10:10 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-07 16:10:10 +0200
commit2b4edba3ad8431f8bd8b7218e9f8a5a5e4ee18ac (patch)
tree6561f793b675ae209e6936d8bf9f25f5749df9d1 /pingu_netlink.c
parentf8b192af8b6611c3832df3024cbabaafffb47591 (diff)
downloadpingu-2b4edba3ad8431f8bd8b7218e9f8a5a5e4ee18ac.tar.bz2
pingu-2b4edba3ad8431f8bd8b7218e9f8a5a5e4ee18ac.tar.xz
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)
Diffstat (limited to 'pingu_netlink.c')
-rw-r--r--pingu_netlink.c4
1 files changed, 1 insertions, 3 deletions
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;