lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <984c7455-bb9c-65cd-da7d-7eaab7b7ae5a@blackwall.org> Date: Tue, 10 Oct 2023 21:52:14 +0300 From: Nikolay Aleksandrov <razor@...ckwall.org> To: Amit Cohen <amcohen@...dia.com>, netdev@...r.kernel.org Cc: mlxsw@...dia.com, dsahern@...il.com, stephen@...workplumber.org, roopa@...dia.com Subject: Re: [PATCH iproute2] bridge: fdb: add an error print for unknown command On 10/10/23 12:57, Amit Cohen wrote: > Commit 6e1ca489c5a2 ("bridge: fdb: add new flush command") added support > for "bridge fdb flush" command. This commit did not handle unsupported > keywords, they are just ignored. > > Add an error print to notify the user when a keyword which is not supported > is used. The kernel will be extended to support flush with VXLAN device, > so new attributes will be supported (e.g., vni, port). When iproute-2 does > not warn for unsupported keyword, user might think that the flush command > works, although the iproute-2 version is too old and it does not send VXLAN > attributes to the kernel. > > Fixes: 6e1ca489c5a2 ("bridge: fdb: add new flush command") > Signed-off-by: Amit Cohen <amcohen@...dia.com> > --- > bridge/fdb.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/bridge/fdb.c b/bridge/fdb.c > index ae8f7b46..d7ef26fd 100644 > --- a/bridge/fdb.c > +++ b/bridge/fdb.c > @@ -761,9 +761,13 @@ static int fdb_flush(int argc, char **argv) > duparg2("vlan", *argv); > NEXT_ARG(); > vid = atoi(*argv); > + } else if (strcmp(*argv, "help") == 0) { > + NEXT_ARG(); > } else { > - if (strcmp(*argv, "help") == 0) > - NEXT_ARG(); > + fprintf(stderr, "bridge fdb: unknown command \"%s\"?\n", > + *argv); > + usage(); > + return -1; > } > argc--; argv++; > } Acked-by: Nikolay Aleksandrov <razor@...ckwall.org>
Powered by blists - more mailing lists