[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220922082854.5aa1bffe@hermes.local>
Date: Thu, 22 Sep 2022 08:28:54 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Benjamin Poirier <bpoirier@...dia.com>
Cc: netdev@...r.kernel.org, David Ahern <dsahern@...nel.org>,
Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH iproute2 1/4] bridge: Do not print stray prefixes in
monitor mode
On Thu, 22 Sep 2022 15:19:35 +0900
Benjamin Poirier <bpoirier@...dia.com> wrote:
> When using `bridge monitor` with the '-timestamp' option or the "all"
> parameter, prefixes are printed before the actual event descriptions.
> Currently, those prefixes are printed for each netlink message that's
> received. However, some netlink messages do not lead to an event
> description being printed. That's usually because a message is not related
> to AF_BRIDGE. This results in stray prefixes being printed.
>
> Restructure accept_msg() and its callees such that prefixes are only
> printed after a message has been checked for eligibility.
>
> The issue can be witnessed using the following commands:
> ip link add dummy0 type dummy
> # Start `bridge monitor all` now in another terminal.
> # Cause a stray "[LINK]" to be printed (family 10).
> # It does not appear yet because the output is line buffered.
> ip link set dev dummy0 up
> # Cause a stray "[NEIGH]" to be printed (family 2).
> ip neigh add 10.0.0.1 lladdr 02:00:00:00:00:01 dev dummy0
> # Cause a genuine entry to be printed, which flushes the previous
> # output.
> bridge fdb add 02:00:00:00:00:01 dev dummy0
> # We now see:
> # [LINK][NEIGH][NEIGH]02:00:00:00:00:01 dev dummy0 self permanent
>
> Fixes: d04bc300c3e3 ("Add bridge command")
> Signed-off-by: Benjamin Poirier <bpoirier@...dia.com>
> ---
Looks good, reminds me that the bridge command need to be converted
to use json_print.
Powered by blists - more mailing lists