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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 13 Nov 2023 15:38:18 -0700
From: David Ahern <dsahern@...nel.org>
To: Stephen Hemminger <stephen@...workplumber.org>,
 Daniel Borkmann <daniel@...earbox.net>
Cc: razor@...ckwall.org, martin.lau@...nel.org, netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] ip, link: Add support for netkit

On 11/13/23 10:34 AM, Stephen Hemminger wrote:
> On Mon, 13 Nov 2023 04:23:23 +0100
> Daniel Borkmann <daniel@...earbox.net> wrote:
> 
>> +	if (tb[IFLA_NETKIT_POLICY]) {
>> +		__u32 policy = rta_getattr_u32(tb[IFLA_NETKIT_POLICY]);
>> +		const char *policy_str =
>> +			policy == NETKIT_PASS ? "forward" :
>> +			policy == NETKIT_DROP ? "blackhole" : "unknown";
>> +
> 
> If you plan to add more modes in future, a table or helper would be good idea.
> 

I would prefer a table driven approach through a helper than the
multi-line logic here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ