From: Tobias Brunner Date: Wed, 19 Nov 2025 09:41:46 +0000 (+0100) Subject: swanctl: Allow connection and child config names to be longer X-Git-Tag: 6.0.4rc1~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80e2cf44a313eda5ee0e0cc546a0a561f65c67eb;p=thirdparty%2Fstrongswan.git swanctl: Allow connection and child config names to be longer VICI imposes an upper limit of 256 characters for names, which we should allow for connection and child configs. --- diff --git a/src/swanctl/commands/load_conns.c b/src/swanctl/commands/load_conns.c index 92be16748c..11005535ca 100644 --- a/src/swanctl/commands/load_conns.c +++ b/src/swanctl/commands/load_conns.c @@ -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);