From: Stephen Hemminger <stephen@networkplumber.org>
To: Benjamin Poirier <bpoirier@nvidia.com>
Cc: netdev@vger.kernel.org, Petr Machata <petrm@nvidia.com>,
Roopa Prabhu <roopa@nvidia.com>
Subject: Re: [PATCH iproute2-next 02/20] bridge: vni: Remove dead code in group argument parsing
Date: Wed, 20 Dec 2023 19:58:21 -0800 [thread overview]
Message-ID: <20231220195821.24a5ce3d@hermes.local> (raw)
In-Reply-To: <20231211140732.11475-3-bpoirier@nvidia.com>
On Mon, 11 Dec 2023 09:07:14 -0500
Benjamin Poirier <bpoirier@nvidia.com> wrote:
> is_addrtype_inet_not_multi(&daddr) may read an uninitialized "daddr". Even
> if that is fixed, the error message that follows cannot be reached because
> the situation would be caught by the previous test (group_present).
> Therefore, remove this test on daddr.
>
> Fixes: 45cd32f9f7d5 ("bridge: vxlan device vnifilter support")
> Reviewed-by: Petr Machata <petrm@nvidia.com>
> Tested-by: Petr Machata <petrm@nvidia.com>
> Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
> ---
> bridge/vni.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/bridge/vni.c b/bridge/vni.c
> index 6c0e35cd..33e50d18 100644
> --- a/bridge/vni.c
> +++ b/bridge/vni.c
> @@ -109,11 +109,6 @@ static int vni_modify(int cmd, int argc, char **argv)
> } else if (strcmp(*argv, "group") == 0) {
> if (group_present)
> invarg("duplicate group", *argv);
> - if (is_addrtype_inet_not_multi(&daddr)) {
> - fprintf(stderr, "vxlan: both group and remote");
> - fprintf(stderr, " cannot be specified\n");
> - return -1;
> - }
> NEXT_ARG();
> get_addr(&daddr, *argv, AF_UNSPEC);
> if (!is_addrtype_inet_multi(&daddr))
This makes sense, and why was the message split in the first place.
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
next prev parent reply other threads:[~2023-12-21 3:58 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 14:07 [PATCH iproute2-next 00/20] bridge: vni: UI fixes Benjamin Poirier
2023-12-11 14:07 ` [PATCH iproute2-next 01/20] bridge: vni: Accept 'del' command Benjamin Poirier
2023-12-21 3:57 ` Stephen Hemminger
2023-12-21 16:06 ` Stephen Hemminger
2023-12-21 16:54 ` Benjamin Poirier
2023-12-21 17:24 ` Stephen Hemminger
2023-12-21 17:46 ` Benjamin Poirier
2023-12-11 14:07 ` [PATCH iproute2-next 02/20] bridge: vni: Remove dead code in group argument parsing Benjamin Poirier
2023-12-21 3:58 ` Stephen Hemminger [this message]
2023-12-11 14:07 ` [PATCH iproute2-next 03/20] bridge: vni: Fix duplicate group and remote error messages Benjamin Poirier
2023-12-21 3:59 ` Stephen Hemminger
2023-12-11 14:07 ` [PATCH iproute2-next 04/20] bridge: vni: Report duplicate vni argument using duparg() Benjamin Poirier
2023-12-21 3:59 ` Stephen Hemminger
2023-12-11 14:07 ` [PATCH iproute2-next 05/20] bridge: vni: Fix vni filter help strings Benjamin Poirier
2023-12-21 4:00 ` Stephen Hemminger
2023-12-11 14:07 ` [PATCH iproute2-next 06/20] bridge: vlan: Use printf() to avoid temporary buffer Benjamin Poirier
2023-12-21 4:03 ` Stephen Hemminger
2023-12-11 14:07 ` [PATCH iproute2-next 07/20] bridge: vlan: Remove paranoid check Benjamin Poirier
2023-12-21 4:04 ` Stephen Hemminger
2023-12-11 14:07 ` [PATCH iproute2-next 08/20] bridge: vni: Remove print_vnifilter_rtm_filter() Benjamin Poirier
2023-12-21 4:05 ` Stephen Hemminger
2023-12-11 14:07 ` [PATCH iproute2-next 09/20] bridge: vni: Move open_json_object() within print_vni() Benjamin Poirier
2023-12-21 4:06 ` Stephen Hemminger
2023-12-11 14:07 ` [PATCH iproute2-next 10/20] bridge: vni: Guard close_vni_port() call Benjamin Poirier
2023-12-21 4:07 ` Stephen Hemminger
2023-12-11 14:07 ` [PATCH iproute2-next 11/20] bridge: vni: Reverse the logic in print_vnifilter_rtm() Benjamin Poirier
2023-12-11 14:07 ` [PATCH iproute2-next 12/20] bridge: vni: Remove stray newlines after each interface Benjamin Poirier
2023-12-11 14:07 ` [PATCH iproute2-next 13/20] bridge: vni: Replace open-coded instance of print_nl() Benjamin Poirier
2023-12-21 4:08 ` Stephen Hemminger
2023-12-11 14:07 ` [PATCH iproute2-next 14/20] bridge: vni: Remove unused argument in open_vni_port() Benjamin Poirier
2023-12-11 14:07 ` [PATCH iproute2-next 15/20] bridge: vni: Align output columns Benjamin Poirier
2023-12-11 14:07 ` [PATCH iproute2-next 16/20] bridge: vni: Indent statistics with 2 spaces Benjamin Poirier
2023-12-11 14:07 ` [PATCH iproute2-next 17/20] bridge: Deduplicate print_range() Benjamin Poirier
2023-12-11 14:07 ` [PATCH iproute2-next 18/20] json_print: Output to temporary buffer in print_range() only as needed Benjamin Poirier
2023-12-11 14:07 ` [PATCH iproute2-next 19/20] json_print: Rename print_range() argument Benjamin Poirier
2023-12-11 14:07 ` [PATCH iproute2-next 20/20] bridge: Provide rta_type() Benjamin Poirier
2023-12-21 4:10 ` [PATCH iproute2-next 00/20] bridge: vni: UI fixes Stephen Hemminger
2024-01-02 9:19 ` Petr Machata
2023-12-22 18:10 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231220195821.24a5ce3d@hermes.local \
--to=stephen@networkplumber.org \
--cc=bpoirier@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@nvidia.com \
--cc=roopa@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.