attr: Fix handling of invalid IPs listed after valid ones
authorTobias Brunner <tobias@strongswan.org>
Wed, 5 Jun 2013 15:10:45 +0000 (17:10 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 5 Jun 2013 15:26:24 +0000 (17:26 +0200)
Invalid IPs listed after a valid one resulted in an attribute
of the same type but with invalid data.

src/libhydra/plugins/attr/attr_provider.c

index ae2c073..1a2fa7f 100644 (file)
@@ -219,7 +219,7 @@ static void load_entries(private_attr_provider_t *this)
                        host = host_create_from_string(token, 0);
                        if (!host)
                        {
-                               if (!type)
+                               if (mapped)
                                {
                                        DBG1(DBG_CFG, "invalid host in key %s: %s", key, token);
                                        continue;