From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2619DC433DB for ; Wed, 3 Feb 2021 22:40:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9B98B64E43 for ; Wed, 3 Feb 2021 22:40:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B98B64E43 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7QpN-0006O1-KW for qemu-devel@archiver.kernel.org; Wed, 03 Feb 2021 17:40:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7Qes-0000If-0x for qemu-devel@nongnu.org; Wed, 03 Feb 2021 17:29:58 -0500 Received: from mail-vs1-xe34.google.com ([2607:f8b0:4864:20::e34]:42288) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7Qeq-0005h0-Ay for qemu-devel@nongnu.org; Wed, 03 Feb 2021 17:29:57 -0500 Received: by mail-vs1-xe34.google.com with SMTP id v19so727105vsf.9 for ; Wed, 03 Feb 2021 14:29:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2CnDQPA2VutawhiAFJDcmgS62w28j51ePUxMLJ093go=; b=YSmHPhkNtYmIwK3Fcxxcq2YUCLxXXW9edjSjOuoMj4agAur/P+2R4rdcuUnWitxiEh CFqBx7mevLtVB0TeJRi5rur73n9MJ1MEHaKG5nmJaGn0ZMwTgQH+ExQmHJmPioM6JPsr Ok20PXZHLk3XnKIIJ5I7n4Rhc5wxwfTyFHx2T4gt59HCAwys73vJd2xZl+ol+kx9g6W5 aSprz0/2zJKnIH7MVOF12Fu7j/SXWbibDPfEUjnvlPG6G38QpDBiVL+1NP+x+VYfJluc bFPptwtRhxDoC0b9z7LwzM+x2qW6DaKLPmMPGS3jFthgdxiF5ulNo1V4BsioM6kakmn8 94kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2CnDQPA2VutawhiAFJDcmgS62w28j51ePUxMLJ093go=; b=gtWLtPBd4Kae3YfSe5Myb68nMYDoYz58LmBHpBXuSWPAxyiJZkbboZK/MliayAAu0N o6hHvNSvtkw7Dxyp4PWE4a6dqYbhc9S2FpB2FgavRlsMKtp/N2CFVPhh6y1P7Pna/IT3 WWayqW/wNheY3tDJWpHGXZDcQHwE+EZaSPMBMTEPcu96Omtc5SCVGPQT8Pn5e3YBOYgd fT3/+jjUrsd2E2gKAofoUA9eOwg7wusH9bbxVX2TgKgi1TcnLhXMcYViFxqBJxjOyMG5 pTKz1pRNeH5A2XLyVZdIYH9dTRtPYvDGwJKfsJGZ4XVn9YfAU8QVYV0vq6X8VU6x9RqK uSkg== X-Gm-Message-State: AOAM530p6xciX6EwaS7wIZyM0//PQGKkYu/rZ/ZbanLIbXH/kn70oMU8 mDOP62cJKbg9rRAA+0I8lzRiQoYDkv3iqlPDWpRZvUrFvKk= X-Google-Smtp-Source: ABdhPJxBVzsyxiS2HcVQrtuDexXTiyWmsPoM4bIGPyP1WC1VZHQZgkkhMoGWaq5YtJo+tctmeRKO3U1eOmTZIb5/juw= X-Received: by 2002:a05:6102:2e5:: with SMTP id j5mr3134665vsj.29.1612391394991; Wed, 03 Feb 2021 14:29:54 -0800 (PST) MIME-Version: 1.0 References: <20210203213729.1940893-1-dje@google.com> <20210203213729.1940893-3-dje@google.com> <20210203222053.htsym7musxnqpc5n@begin> In-Reply-To: <20210203222053.htsym7musxnqpc5n@begin> From: Doug Evans Date: Wed, 3 Feb 2021 14:29:16 -0800 Message-ID: Subject: Re: [PATCH v2 2/2] net: Add -ipv6-hostfwd option, ipv6_hostfwd_add/remove commands To: Samuel Thibault Cc: QEMU Developers Content-Type: multipart/alternative; boundary="00000000000056c48f05ba762059" Received-SPF: pass client-ip=2607:f8b0:4864:20::e34; envelope-from=dje@google.com; helo=mail-vs1-xe34.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --00000000000056c48f05ba762059 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 3, 2021 at 2:20 PM Samuel Thibault wrote: > Doug Evans, le mer. 03 f=C3=A9vr. 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 =3D "ipv6_hostfwd_add", > > + .args_type =3D "arg1:s,arg2:s?", > > + .params =3D "[netdev_id] > [tcp|udp]:[hostaddr6]:hostport-[guestaddr6]:guestport", > > Perhaps explicit that the IPv6 address should be enclosed with [] ? > Yeah, totally open to suggestions for what to write. I wasn't sure how to do that without getting klunky, > > + /* 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. > Completely agree. --00000000000056c48f05ba762059 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Feb 3, 2021 at 2:20 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
=
Doug Evans, le mer. 03 f=C3=A9vr. 2021 13:37:29 -0800, a ecri= t:
> @@ -1392,6 +1392,34 @@ SRST
>=C2=A0 =C2=A0 Remove host-to-guest TCP or UDP redirection.
>=C2=A0 ERST
>=C2=A0
> +#ifdef CONFIG_SLIRP
> +=C2=A0 =C2=A0 {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 .name=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D "= ;ipv6_hostfwd_add",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 .args_type=C2=A0 =3D "arg1:s,arg2:s?= ",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 .params=C2=A0 =C2=A0 =C2=A0=3D "[net= dev_id] [tcp|udp]:[hostaddr6]:hostport-[guestaddr6]:guestport",

Perhaps explicit that the IPv6 address should be enclosed with [] ?


Yeah, totally open to suggestions for what to write= .
I wasn't = sure how to do that without getting klunky,


> +=C2=A0 =C2=A0 /* Ignore the part between the ']' and addr_sep= . */
> +=C2=A0 =C2=A0 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.


<= /div>
Completely=C2= =A0agree.
--00000000000056c48f05ba762059--