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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220108212951.GA22261@pc-4.home>
Date:   Sat, 8 Jan 2022 22:29:51 +0100
From:   Guillaume Nault <gnault@...hat.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     netdev@...r.kernel.org, Stephen Hemminger <sthemmin@...rosoft.com>
Subject: Re: [PATCH iproute2-next 04/11] m_vlan: fix formatting of push
 ethernet src mac

On Sat, Jan 08, 2022 at 12:46:43PM -0800, Stephen Hemminger wrote:
> This was reported as a clang warning:
>     CC       m_vlan.o
> m_vlan.c:282:32: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
>                 if (tb[TCA_VLAN_PUSH_ETH_SRC &&
>                                              ^
> 
> But it is really a bug in the code for displaying the pushed
> source mac.
> 
> Fixes: d61167dd88b4 ("m_vlan: add pop_eth and push_eth actions")
> Cc: gnault@...hat.com
> Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
> ---
>  tc/m_vlan.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tc/m_vlan.c b/tc/m_vlan.c
> index 221083dfc0da..1b2b1d51ed2d 100644
> --- a/tc/m_vlan.c
> +++ b/tc/m_vlan.c
> @@ -279,8 +279,8 @@ static int print_vlan(struct action_util *au, FILE *f, struct rtattr *arg)
>  				    ETH_ALEN, 0, b1, sizeof(b1));
>  			print_string(PRINT_ANY, "dst_mac", " dst_mac %s", b1);
>  		}
> -		if (tb[TCA_VLAN_PUSH_ETH_SRC &&
> -		       RTA_PAYLOAD(tb[TCA_VLAN_PUSH_ETH_SRC]) == ETH_ALEN]) {
> +		if (tb[TCA_VLAN_PUSH_ETH_SRC] &&
> +		       RTA_PAYLOAD(tb[TCA_VLAN_PUSH_ETH_SRC]) == ETH_ALEN) {
>  			ll_addr_n2a(RTA_DATA(tb[TCA_VLAN_PUSH_ETH_SRC]),
>  				    ETH_ALEN, 0, b1, sizeof(b1));
>  			print_string(PRINT_ANY, "src_mac", " src_mac %s", b1);

This is already fixed in iproute2 with commit 0e949725908b ("tc/m_vlan:
fix print_vlan() conditional on TCA_VLAN_ACT_PUSH_ETH").

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ