From e148ba2db8e2b2e38c5e4f8ec672de74f72fcf6d Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 9 Sep 2011 13:16:24 +0200 Subject: 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. --- pingu_host.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pingu_host.c') 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; -- cgit v1.2.3