From: Chris Wright Date: Sat, 9 Dec 2006 01:27:27 +0000 (-0800) Subject: another netlink userspace fix from DaveM X-Git-Tag: v2.6.19.1~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e75523f0bdeba4a7932ff0cd0ce87a584dcb0389;p=thirdparty%2Fkernel%2Fstable-queue.git another netlink userspace fix from DaveM --- diff --git a/queue-2.6.19/netlink-put-ifa-ifla-_-rta-payload-macros-back-for-userspace.patch b/queue-2.6.19/netlink-put-ifa-ifla-_-rta-payload-macros-back-for-userspace.patch new file mode 100644 index 00000000000..dcc093a03f0 --- /dev/null +++ b/queue-2.6.19/netlink-put-ifa-ifla-_-rta-payload-macros-back-for-userspace.patch @@ -0,0 +1,54 @@ +From stable-bounces@linux.kernel.org Fri Dec 8 17:19:59 2006 +Date: Fri, 08 Dec 2006 17:14:38 -0800 (PST) +Message-Id: <20061208.171438.78738738.davem@davemloft.net> +To: stable@kernel.org +From: David Miller +Subject: 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 +Signed-off-by: Chris Wright +--- + + commit c0279128f20aa3580b0b43aaa49f351f6bad5f30 + Author: David S. Miller + Date: Fri Dec 8 17:05:13 2006 -0800 + +--- + include/linux/if_addr.h | 6 ++++++ + include/linux/if_link.h | 6 ++++++ + 2 files changed, 12 insertions(+) + +--- linux-2.6.19.orig/include/linux/if_addr.h ++++ linux-2.6.19/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 +--- linux-2.6.19.orig/include/linux/if_link.h ++++ linux-2.6.19/include/linux/if_link.h +@@ -82,6 +82,12 @@ enum + + #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. diff --git a/queue-2.6.19/series b/queue-2.6.19/series index 73b63b46f3f..962ad1482d6 100644 --- a/queue-2.6.19/series +++ b/queue-2.6.19/series @@ -30,3 +30,4 @@ softirq-remove-bug_ons-which-can-incorrectly-trigger.patch m32r-make-userspace-headers-platform-independent.patch x86_64-fix-boot-hang-due-to-nmi-watchdog-init-code.patch forcedeth-disable-intx-when-enabling-msi-in-forcedeth.patch +netlink-put-ifa-ifla-_-rta-payload-macros-back-for-userspace.patch