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:   Wed, 27 Oct 2021 22:13:16 +0200
From:   Michal Kubecek <mkubecek@...e.cz>
To:     bage@...utronix.de
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH ethtool 1/2] netlink: settings: Correct duplicate
 condition

On Wed, Oct 27, 2021 at 08:11:39PM +0200, bage@...utronix.de wrote:
> From: Bastian Germann <bage@...utronix.de>
> 
> tb's fields ETHTOOL_A_LINKINFO_TP_MDIX and ETHTOOL_A_LINKINFO_TP_MDIX_CTRL
> are used in this case. The condition is duplicate for the former. Fix that.
> 
> Signed-off-by: Bastian Germann <bage@...utronix.de>
> ---
>  netlink/settings.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/netlink/settings.c b/netlink/settings.c
> index 6d10a07..c4f5d61 100644
> --- a/netlink/settings.c
> +++ b/netlink/settings.c
> @@ -560,7 +560,7 @@ int linkinfo_reply_cb(const struct nlmsghdr *nlhdr, void *data)
>  		print_enum(names_transceiver, ARRAY_SIZE(names_transceiver),
>  			   val, "Transceiver");
>  	}
> -	if (tb[ETHTOOL_A_LINKINFO_TP_MDIX] && tb[ETHTOOL_A_LINKINFO_TP_MDIX] &&
> +	if (tb[ETHTOOL_A_LINKINFO_TP_MDIX] && tb[ETHTOOL_A_LINKINFO_TP_MDIX_CTRL] &&
>  	    port == PORT_TP) {
>  		uint8_t mdix = mnl_attr_get_u8(tb[ETHTOOL_A_LINKINFO_TP_MDIX]);
>  		uint8_t mdix_ctrl =

Fixes: 10cc3ea337d1 ("netlink: partial netlink handler for gset (no option)")
Acked-by: Michal Kubecek <mkubecek@...e.cz>

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ