aboutsummaryrefslogtreecommitdiffstats
path: root/pingu_host.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-09-09 13:16:24 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2011-09-09 13:16:24 +0200
commite148ba2db8e2b2e38c5e4f8ec672de74f72fcf6d (patch)
treeea9e56ee09c530b044421df399378f2734cdb613 /pingu_host.c
parent78f7022bed26685f49dcbf7a5ab2489106bc1300 (diff)
downloadpingu-e148ba2db8e2b2e38c5e4f8ec672de74f72fcf6d.tar.bz2
pingu-e148ba2db8e2b2e38c5e4f8ec672de74f72fcf6d.tar.xz
pingu_netlink: do not add dead routes to multipath
We don't was add a multipath via an interface that a pinghost has set as DOWN.
Diffstat (limited to 'pingu_host.c')
-rw-r--r--pingu_host.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pingu_host.c b/pingu_host.c
index 1f1b534..360ec6d 100644
--- a/pingu_host.c
+++ b/pingu_host.c
@@ -102,6 +102,15 @@ struct pingu_host *pingu_host_new(char *hoststr, float burst_interval,
return host;
}
+struct pingu_host *pingu_host_find_by_iface(struct pingu_iface *iface)
+{
+ struct pingu_host *host;
+ list_for_each_entry(host, &host_list, host_list_entry)
+ if (host->iface == iface)
+ return host;
+ return NULL;
+}
+
int pingu_host_init(struct ev_loop *loop)
{
struct pingu_host *host;