From: Tobias Brunner Date: Thu, 4 Feb 2016 17:41:14 +0000 (+0100) Subject: p-cscf: Make sending requests configurable and disable it by default X-Git-Tag: 5.4.0rc1~9^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=276acafa2dd2f3fbe8e0bad50cfd532334a86b9c;p=thirdparty%2Fstrongswan.git p-cscf: Make sending requests configurable and disable it by default --- diff --git a/conf/Makefile.am b/conf/Makefile.am index 72d9f258d2..b7edaa8eec 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -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 index 0000000000..ec7f8153fe --- /dev/null +++ b/conf/plugins/p-cscf.opt @@ -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. = no + is the name of a connection with an ePDG from which to request + P-CSCF server addresses. + + 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. diff --git a/src/libcharon/plugins/p_cscf/p_cscf_handler.c b/src/libcharon/plugins/p_cscf/p_cscf_handler.c index f122f9ac41..76633845ee 100644 --- a/src/libcharon/plugins/p_cscf/p_cscf_handler.c +++ b/src/libcharon/plugins/p_cscf/p_cscf_handler.c @@ -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; }