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: <ZJrDT9k52oFTf/vs@lenoch>
Date: Tue, 27 Jun 2023 13:09:03 +0200
From: Ladislav Michl <oss-lists@...ops.cz>
To: Michal Kubecek <mkubecek@...e.cz>
Cc: netdev@...r.kernel.org
Subject: [PATCH ethtool] netlink: fix duplex setting

From: Ladislav Michl <ladis@...ux-mips.org>

nl_parse_lookup_u8 handler is used with duplex_values defined as
lookup_entry_u32. While it still works on little endian machines,
duplex is always 0 (DUPLEX_HALF) on big endian ones...

Fixes: 392b12e38747 ("netlink: add netlink handler for sset (-s)")
Signed-off-by: Ladislav Michl <ladis@...ux-mips.org>
---
 netlink/settings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/netlink/settings.c b/netlink/settings.c
index 4fd75d2..9aad8d9 100644
--- a/netlink/settings.c
+++ b/netlink/settings.c
@@ -1089,7 +1089,7 @@ static const struct bitset_parser_data advertise_parser_data = {
 	.force_hex	= true,
 };
 
-static const struct lookup_entry_u32 duplex_values[] = {
+static const struct lookup_entry_u8 duplex_values[] = {
 	{ .arg = "half",	.val = DUPLEX_HALF },
 	{ .arg = "full",	.val = DUPLEX_FULL },
 	{}
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ