Use random ports in NetworkManager backend
[strongswan.git] / src / charon-nm / charon-nm.c
index c1101a4..35e9067 100644 (file)
@@ -206,6 +206,10 @@ int main(int argc, char *argv[])
 
        initialize_logger();
 
+       /* 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_natt_t", 0);
+
        DBG1(DBG_DMN, "Starting charon NetworkManager backend (strongSwan "VERSION")");
        if (lib->integrity)
        {