[PATCH 5/7] header: Add NL_SET_BAD_ATTR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is  used by the mac80211_hwsim driver. The code was copied from the
mainline kernel.
This was introduced in mainline kernel commit c3ab2b4ec8f7 ("net: ipv4:
Add extack messages for route add failures")

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/netlink.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/backport/backport-include/linux/netlink.h b/backport/backport-include/linux/netlink.h
index 7da31aad..468a12d1 100644
--- a/backport/backport-include/linux/netlink.h
+++ b/backport/backport-include/linux/netlink.h
@@ -32,4 +32,11 @@ struct netlink_ext_ack {
 #define NETLINK_CB_PORTID(__skb) NETLINK_CB(__skb).portid
 #endif
 
+#ifndef NL_SET_BAD_ATTR
+#define NL_SET_BAD_ATTR(extack, attr) do {		\
+	if ((extack))					\
+		(extack)->bad_attr = (attr);		\
+} while (0)
+#endif /* NL_SET_BAD_ATTR */
+
 #endif /* __BACKPORT_LINUX_NETLINK_H */
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux