Files
qemu/net
Michael Tokarev 2ec80ad928 net/slirp: allow hostfwd socket paths with dashes
The format of hostfwd parameter is:
  hostfwd=hostpart-guestaddr:guestport
so a minus sign can not be part of the hostpart.
If hostpart specifies a unix socket path, this becomes problematic.

To solve this, look for the LAST minus/dash char in the string,
not first.

Unfortunately, [-guestaddr] is optional (defaults to 10.0.0.15),
so we still can't parse the thing in an uniform way.

Extend get_str_sep() to accept negative separator to indicate searching
from the end of buffer, to find the last occurence.  Update slirp_hostfwd
to search for the last separator when parsing unix domain socket path.

Inspired-by: Christopher Palmer-Richez <crichez@pm.me>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/347
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-06-12 17:56:30 +03:00
..
2026-05-26 14:09:30 +08:00
2025-07-14 13:27:09 +08:00
2024-10-03 17:26:05 +03:00
2026-01-23 14:41:26 +08:00
2026-01-23 14:41:26 +08:00
2026-01-23 14:41:26 +08:00
2025-10-04 10:51:02 -04:00
2026-01-23 14:41:26 +08:00
2026-01-23 14:41:26 +08:00
2026-05-26 14:09:30 +08:00