From 645d7a5ef32b03d137d21b2dc73fdb6d528d65dc Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 14 Sep 2012 16:30:06 +0200 Subject: %any is never on a local interface --- src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c | 5 +++++ src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'src') diff --git a/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c b/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c index b4eabb2e9..2180b9008 100644 --- a/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c +++ b/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c @@ -1009,6 +1009,11 @@ METHOD(kernel_net_t, get_interface_name, bool, addr_entry_t *addr; bool found = FALSE; + if (ip->is_anyaddr(ip)) + { + return FALSE; + } + this->mutex->lock(this->mutex); ifaces = this->ifaces->create_enumerator(this->ifaces); while (ifaces->enumerate(ifaces, &iface)) diff --git a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c index d24820caf..d46c019eb 100644 --- a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c +++ b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c @@ -480,6 +480,11 @@ METHOD(kernel_net_t, get_interface_name, bool, addr_entry_t *addr; bool found = FALSE; + if (ip->is_anyaddr(ip)) + { + return FALSE; + } + this->mutex->lock(this->mutex); ifaces = this->ifaces->create_enumerator(this->ifaces); while (ifaces->enumerate(ifaces, &iface)) -- cgit v1.2.3