]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
swanctl: Allow connection and child config names to be longer
authorTobias Brunner <tobias@strongswan.org>
Wed, 19 Nov 2025 09:41:46 +0000 (10:41 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 19 Nov 2025 09:50:06 +0000 (10:50 +0100)
VICI imposes an upper limit of 256 characters for names, which we should
allow for connection and child configs.

src/swanctl/commands/load_conns.c

index 92be16748c5cb76a788c49d9d8806a7d750d56fd..11005535ca384221e21b2ccbc1fc97d02bbc511a 100644 (file)
@@ -202,7 +202,7 @@ static bool add_key_values(vici_req_t *req, settings_t *cfg, char *section)
 static bool add_sections(vici_req_t *req, settings_t *cfg, char *section)
 {
        enumerator_t *enumerator;
-       char *name, buf[256];
+       char *name, buf[1024];
        bool ret = TRUE;
 
        enumerator = cfg->create_section_enumerator(cfg, section);
@@ -236,7 +236,7 @@ static bool load_conn(vici_conn_t *conn, settings_t *cfg,
        vici_req_t *req;
        vici_res_t *res;
        bool ret = TRUE;
-       char buf[BUF_LEN];
+       char buf[1024];
 
        snprintf(buf, sizeof(buf), "%s.%s", "connections", section);