%any is never on a local interface
authorTobias Brunner <tobias@strongswan.org>
Fri, 14 Sep 2012 14:30:06 +0000 (16:30 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 21 Sep 2012 16:16:26 +0000 (18:16 +0200)
src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c
src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c

index b4eabb2..2180b90 100644 (file)
@@ -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))
index d24820c..d46c019 100644 (file)
@@ -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))