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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri,  4 Apr 2014 10:07:20 -0700
From:	Cong Wang <>
Cc:, Jiri Pirko <>,
	Stephen Hemminger <>,
	Cong Wang <>
Subject: [Patch iproute2 v2] ipaddress: do not add IFA_FLAGS when not necessary

commit 37c9b94ed21d5779acc23d89a4 (add support for extended ifa_flags)
introduced a regression:

        # ./ip/ip addr add dev eth0
        RTNETLINK answers: Invalid argument

This is due to old kernels don't support IFA_FLAGS flag, we should not
use it if we don't use the flags beyond old .ifa_flags.

Cc: Jiri Pirko <>
Cc: Stephen Hemminger <>
Signed-off-by: Cong Wang <>

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 14d1720..e3be5b2 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -1398,8 +1398,10 @@ static int ipaddr_modify(int cmd, int flags, int argc, char **argv)
 		argc--; argv++;
-	req.ifa.ifa_flags = ifa_flags;
-	addattr32(&req.n, sizeof(req), IFA_FLAGS, ifa_flags);
+	if (ifa_flags <= 0xff)
+		req.ifa.ifa_flags = ifa_flags;
+	else
+		addattr32(&req.n, sizeof(req), IFA_FLAGS, ifa_flags);
 	if (d == NULL) {
 		fprintf(stderr, "Not enough information: \"dev\" argument is required.\n");
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists