p-cscf: Make sending requests configurable and disable it by default
authorTobias Brunner <tobias@strongswan.org>
Thu, 4 Feb 2016 17:41:14 +0000 (18:41 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 10 Mar 2016 10:57:38 +0000 (11:57 +0100)
conf/Makefile.am
conf/plugins/p-cscf.opt [new file with mode: 0644]
src/libcharon/plugins/p_cscf/p_cscf_handler.c

index 72d9f25..b7edaa8 100644 (file)
@@ -73,6 +73,7 @@ plugins = \
        plugins/ntru.opt \
        plugins/openssl.opt \
        plugins/osx-attr.opt \
+       plugins/p-cscf.opt \
        plugins/pkcs11.opt \
        plugins/radattr.opt \
        plugins/random.opt \
diff --git a/conf/plugins/p-cscf.opt b/conf/plugins/p-cscf.opt
new file mode 100644 (file)
index 0000000..ec7f815
--- /dev/null
@@ -0,0 +1,11 @@
+charon.plugins.p-cscf.enable {}
+       Section to enable requesting P-CSCF server addresses for individual
+       connections.
+
+charon.plugins.p-cscf.enable.<conn> = no
+       <conn> is the name of a connection with an ePDG from which to request
+       P-CSCF server addresses.
+
+       <conn> is the name of a connection with an ePDG from which to request
+       P-CSCF server addresses.  Requests will be sent for addresses of the same
+       families for which internal IPs are requested.
index f122f9a..7663384 100644 (file)
@@ -135,9 +135,13 @@ METHOD(attribute_handler_t, create_attribute_enumerator, enumerator_t *,
                        .enumerate = (void*)_enumerate_attrs,
                        .destroy = (void*)free,
                },
-               .request_ipv4 = has_host_family(vips, AF_INET),
-               .request_ipv6 = has_host_family(vips, AF_INET6),
        );
+       if (lib->settings->get_bool(lib->settings, "%s.plugins.p-cscf.enable.%s",
+                                                               FALSE, lib->ns, ike_sa->get_name(ike_sa)))
+       {
+               enumerator->request_ipv4 = has_host_family(vips, AF_INET);
+               enumerator->request_ipv6 = has_host_family(vips, AF_INET6);
+       }
        return &enumerator->public;
 }