# HG changeset patch # User František Kučera # Date 1661026345 -7200 # Node ID 97fe991ad2cb28345932c7788bf5d784460ac329 # Parent f2697551bfd5c05df870f059f99c94cdd4283f6f fix connection string parsing: IPv6 literals without the interface name diff -r f2697551bfd5 -r 97fe991ad2cb src/CLIParser.h --- a/src/CLIParser.h Sat Aug 20 01:18:06 2022 +0200 +++ b/src/CLIParser.h Sat Aug 20 22:12:25 2022 +0200 @@ -85,7 +85,7 @@ // Parse the connection string and convert it to options: if (connectionString.size()) { std::string connectionStringBytes = convertor.to_bytes(connectionString); - std::regex pattern("(tcp|udp|sctp)://(([^:]+)|\\[([0-9a-fA-F:]+(%[a-zA-Z0-9]+))\\]):([0-9]+)|(uds)://(.*)"); + std::regex pattern("(tcp|udp|sctp)://(([^:]+)|\\[([0-9a-fA-F:]+(%[a-zA-Z0-9]+)?)\\]):([0-9]+)|(uds)://(.*)"); // 1 23 4 5 6 7 8 std::smatch match; if (std::regex_match(connectionStringBytes, match, pattern)) {