|
From: | Doug Evans |
Subject: | Re: [PATCH v2 2/2] net: Add -ipv6-hostfwd option, ipv6_hostfwd_add/remove commands |
Date: | Wed, 3 Feb 2021 14:29:16 -0800 |
Doug Evans, le mer. 03 févr. 2021 13:37:29 -0800, a ecrit:
> @@ -1392,6 +1392,34 @@ SRST
> Remove host-to-guest TCP or UDP redirection.
> ERST
>
> +#ifdef CONFIG_SLIRP
> + {
> + .name = "ipv6_hostfwd_add",
> + .args_type = "arg1:s,arg2:s?",
> + .params = "[netdev_id] [tcp|udp]:[hostaddr6]:hostport-[guestaddr6]:guestport",
Perhaps explicit that the IPv6 address should be enclosed with [] ?
> + /* Ignore the part between the ']' and addr_sep. */
> + if (get_str_sep(buf, sizeof(buf), &p, addr_sep) < 0) {
Mmm, I would say that we do not want to just ignore it, and rather make
sure that it is empty, so that we can possibly make extensions later
without breaking existing misuse.
[Prev in Thread] | Current Thread | [Next in Thread] |