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] [day] [month] [year] [list]
Message-ID: <04ab053f-87bb-bdde-4550-9aee41b65796@iogearbox.net>
Date: Tue, 14 Nov 2023 03:12:50 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: David Ahern <dsahern@...nel.org>,
 Stephen Hemminger <stephen@...workplumber.org>
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 11:38 PM, David Ahern wrote:
> 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.

Sounds good, will include this in a v2.

Thanks,
Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ