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-next>] [day] [month] [year] [list]
Message-ID: <20241016035848.292603-1-mohan.prasad@microchip.com>
Date: Wed, 16 Oct 2024 09:28:47 +0530
From: Mohan Prasad J <mohan.prasad@...rochip.com>
To: <f.pfitzner@...gutronix.de>, <mkubecek@...e.cz>, <netdev@...r.kernel.org>,
	<kory.maincent@...tlin.com>, <davem@...emloft.net>
CC: <kuba@...nel.org>, <andrew@...n.ch>, <Anbazhagan.Sakthivel@...rochip.com>,
	<Nisar.Sayed@...rochip.com>, <mohan.prasad@...rochip.com>
Subject: [PATCH ethtool] netlink: settings: Fix for wrong auto-negotiation state

Auto-negotiation state in json format showed the
opposite state due to wrong comparison.
Fix for returning the correct auto-neg state implemented.

Signed-off-by: Mohan Prasad J <mohan.prasad@...rochip.com>
---
 netlink/settings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/netlink/settings.c b/netlink/settings.c
index dbfb520..a454bfb 100644
--- a/netlink/settings.c
+++ b/netlink/settings.c
@@ -546,7 +546,7 @@ int linkmodes_reply_cb(const struct nlmsghdr *nlhdr, void *data)
 						(autoneg == AUTONEG_DISABLE) ? "off" : "on");
 		else
 			print_bool(PRINT_JSON, "auto-negotiation", NULL,
-				   autoneg == AUTONEG_DISABLE);
+				   (autoneg == AUTONEG_DISABLE) ? false : true);
 	}
 	if (tb[ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG]) {
 		uint8_t val;
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ