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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061208.171455.11932070.davem@davemloft.net>
Date:	Fri, 08 Dec 2006 17:14:55 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	drow@...se.org
Cc:	stefan@...lof.de, tgraf@...g.ch, dwmw2@...radead.org,
	joseph@...esourcery.com, netdev@...r.kernel.org,
	libc-alpha@...rceware.org, akpm@...l.org
Subject: Re: [NETLINK]: Restore API compatibility of address and neighbour
 bits

From: David Miller <davem@...emloft.net>
Date: Fri, 08 Dec 2006 16:43:45 -0800 (PST)

> hohum... guess we'll need to bring back that crap too...
> 
> i'll take care of this

Here's what I'll push into the tree.

commit c0279128f20aa3580b0b43aaa49f351f6bad5f30
Author: David S. Miller <davem@...set.davemloft.net>
Date:   Fri Dec 8 17:05:13 2006 -0800

    [NETLINK]: Put {IFA,IFLA}_{RTA,PAYLOAD} macros back for userspace.
    
    GLIBC uses them etc.
    
    They are guarded by ifndef __KERNEL__ so nobody will start
    accidently using them in the kernel again, it's just for
    userspace.
    
    Signed-off-by: David S. Miller <davem@...emloft.net>

diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h
index dbe8f61..d557e4c 100644
--- a/include/linux/if_addr.h
+++ b/include/linux/if_addr.h
@@ -52,4 +52,10 @@ struct ifa_cacheinfo
 	__u32	tstamp; /* updated timestamp, hundredths of seconds */
 };
 
+/* backwards compatibility for userspace */
+#ifndef __KERNEL__
+#define IFA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
+#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
+#endif
+
 #endif
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index e963a07..35ed3b5 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -82,6 +82,12 @@ #define IFLA_WEIGHT IFLA_WEIGHT
 
 #define IFLA_MAX (__IFLA_MAX - 1)
 
+/* backwards compatibility for userspace */
+#ifndef __KERNEL__
+#define IFLA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
+#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
+#endif
+
 /* ifi_flags.
 
    IFF_* flags.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ