]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
%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 b4eabb2e9d761f34399158eeaf199dc74f429378..2180b9008cf77eb34dbc31f4c471b57476f27df0 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 d24820caf4d64837e642aecf60ff4a72f10fcc65..d46c019eb0e1bced06aedcc1299b0f838b5f3443 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))