Currently `systemd-ssh-generator` supports
`systemd.ssh_listen=vsock::22` and aliases the "empty CID" towards
`VMADDR_CID_ANY`. VMADDR_CID_ANY is -1, so it's confusing from a user
experience that `systemd.ssh_listen=vsock:-1:22` isn't supported.
return -EINVAL;
/* Parsed an AF_VSOCK "CID". This is a 32bit entity, and the usual type is "unsigned". We recognize
- * the three special CIDs as strings, and otherwise parse the numeric CIDs. */
+ * the four special CIDs as strings, and otherwise parse the numeric CIDs. */
if (streq(s, "hypervisor"))
*ret = VMADDR_CID_HYPERVISOR;
*ret = VMADDR_CID_LOCAL;
else if (streq(s, "host"))
*ret = VMADDR_CID_HOST;
+ else if (STR_IN_SET(s, "any", "-1"))
+ *ret = VMADDR_CID_ANY;
else
return safe_atou(s, ret);