]> git.ipfire.org Git - thirdparty/strongswan.git/blobdiff - src/charon-nm/charon-nm.c
charon-nm: Allow using fixed source ports
[thirdparty/strongswan.git] / src / charon-nm / charon-nm.c
index 0134f5a71d8bfce9fde19edd8daca14d09c7a9ed..1aa975efb6eaf287d1994e8c7d7a8ae7da716f52 100644 (file)
@@ -196,9 +196,9 @@ int main(int argc, char *argv[])
                                                           "charon-nm.syslog.daemon.default", 1));
        charon->load_loggers(charon);
 
-       /* use random ports to avoid conflicts with regular charon */
-       lib->settings->set_int(lib->settings, "charon-nm.port", 0);
-       lib->settings->set_int(lib->settings, "charon-nm.port_nat_t", 0);
+       /* default to random ports to avoid conflicts with regular charon */
+       lib->settings->set_default_str(lib->settings, "charon-nm.port", "0");
+       lib->settings->set_default_str(lib->settings, "charon-nm.port_nat_t", "0");
 
        DBG1(DBG_DMN, "Starting charon NetworkManager backend (strongSwan "VERSION")");
        if (lib->integrity)