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  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]
Date:   Thu, 31 Mar 2022 14:37:28 +0200
From:   Florent Fourcot <>
Cc:     Florent Fourcot <>,
        Brian Baboch <>
Subject: [PATCH net-next] rtnetlink: enable alt_ifname for setlink/newlink

buffer is always valid when called by setlink/newlink,
but contains only empty string when IFLA_IFNAME is not given. So
IFLA_ALT_IFNAME is always ignored

Fixes: 76c9ac0ee878 ("net: rtnetlink: add possibility to use alternative names as message handle")
Signed-off-by: Florent Fourcot <>
Signed-off-by: Brian Baboch <>
 net/core/rtnetlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 3313419bbcba..613065a53b34 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2979,7 +2979,7 @@ static struct net_device *rtnl_dev_get(struct net *net,
 	char buffer[ALTIFNAMSIZ];
-	if (!ifname) {
+	if (!ifname || !ifname[0]) {
 		ifname = buffer;
 		if (ifname_attr)
 			nla_strscpy(ifname, ifname_attr, IFNAMSIZ);

Powered by blists - more mailing lists