lkml.org 
[lkml]   [2022]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Bridge] [PATCH iproute2-next 2/2] bridge: fdb: enable FDB blackhole feature
On Thu, 29 Sep 2022 17:21:37 +0200
Hans Schultz <netdev@kapio-technology.com> wrote:

>
> @@ -493,6 +496,8 @@ static int fdb_modify(int cmd, int flags, int argc, char **argv)
> req.ndm.ndm_flags |= NTF_EXT_LEARNED;
> } else if (matches(*argv, "sticky") == 0) {
> req.ndm.ndm_flags |= NTF_STICKY;
> + } else if (matches(*argv, "blackhole") == 0) {
> + ext_flags |= NTF_EXT_BLACKHOLE;
> } else {
> if (strcmp(*argv, "to") == 0)
> NEXT_ARG();

The parsing of flags is weird here, most of the flags are compared with strcmp()
but some use matches().. I should have used strcmp() all the time; but at the
time did not realize what kind of confusion matches() can cause.

\
 
 \ /
  Last update: 2022-09-29 17:46    [W:0.095 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site