aboutsummaryrefslogtreecommitdiffstats
path: root/pingu_netlink.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-09-09 13:32:12 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2011-09-09 13:32:12 +0200
commite7828c0ba51dc8819cb00de378828ef549d1f190 (patch)
tree76e5fbc044e9974d176ecc6056d37bb946370da7 /pingu_netlink.c
parente148ba2db8e2b2e38c5e4f8ec672de74f72fcf6d (diff)
downloadpingu-e7828c0ba51dc8819cb00de378828ef549d1f190.tar.bz2
pingu-e7828c0ba51dc8819cb00de378828ef549d1f190.tar.xz
pingu_host: cleanup. use constant to indicate host online/offline
This is to make code cleaner and easier to read.
Diffstat (limited to 'pingu_netlink.c')
-rw-r--r--pingu_netlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pingu_netlink.c b/pingu_netlink.c
index 81fcad1..5c63a51 100644
--- a/pingu_netlink.c
+++ b/pingu_netlink.c
@@ -374,7 +374,8 @@ static int add_nexthops(struct nlmsghdr *nlh, size_t nlh_size,
case RTM_NEWROUTE:
host = pingu_host_find_by_iface(iface);
if ((!iface->balance) || iface->index == 0
- || (host != NULL && !host->status) || route == NULL)
+ || (host != NULL && host->status == PINGU_HOST_STATUS_OFFLINE)
+ || route == NULL)
continue;
iface->has_multipath = 1;
break;