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: <20230518084908.7c0e14d4@hermes.local> Date: Thu, 18 May 2023 08:49:08 -0700 From: Stephen Hemminger <stephen@...workplumber.org> To: Vladimir Nikishkin <vladimir@...ishkin.pw> Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, eng.alaamohamedsoliman.am@...il.com, gnault@...hat.com, razor@...ckwall.org, idosch@...dia.com, liuhangbin@...il.com, eyal.birger@...il.com, jtoppins@...hat.com Subject: Re: [PATCH iproute2-next v4] ip-link: add support for nolocalbypass in vxlan On Thu, 18 May 2023 21:46:01 +0800 Vladimir Nikishkin <vladimir@...ishkin.pw> wrote: > + if (tb[IFLA_VXLAN_LOCALBYPASS]) { > + __u8 localbypass = rta_getattr_u8(tb[IFLA_VXLAN_LOCALBYPASS]); > + > + print_bool(PRINT_JSON, "localbypass", NULL, localbypass); > + if (localbypass) { > + print_string(PRINT_FP, NULL, "localbypass ", NULL); > + } else { > + print_string(PRINT_FP, NULL, "nolocalbypass ", NULL); > + } > + } You don't have to print anything if nolocalbypass. Use presence as a boolean in JSON. I.e. if (tb[IFLA_VXLAN_LOCALBYPASS] && rta_getattr_u8(tb[IFLA_VXLAN_LOCALBYPASS])) { print_bool(PRINT_ANY, "localbypass", "localbypass", true); } That is what other options do. Follows the best practices for changes to existing programs: your new feature should look like all the others.
Powered by blists - more mailing lists