Allow calls to set_address() for any host-sized TS, not only dynamic ones
authorTobias Brunner <tobias@strongswan.org>
Wed, 12 Sep 2012 16:10:04 +0000 (18:10 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 12 Sep 2012 16:14:01 +0000 (18:14 +0200)
This fixes CHILD_SA updates (e.g. due to MOBIKE), which were broken
since 4cb0783.

src/libstrongswan/selectors/traffic_selector.c

index 66eeeff..b19b962 100644 (file)
@@ -513,7 +513,7 @@ METHOD(traffic_selector_t, is_dynamic, bool,
 METHOD(traffic_selector_t, set_address, void,
        private_traffic_selector_t *this, host_t *host)
 {
-       if (this->dynamic)
+       if (is_host(this, NULL))
        {
                this->type = host->get_family(host) == AF_INET ?
                                TS_IPV4_ADDR_RANGE : TS_IPV6_ADDR_RANGE;