summaryrefslogtreecommitdiff
path: root/backport
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-09-17 23:31:40 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-09-19 11:07:01 +0200
commit4225f260e5071349eaf3512361197c4d456c461b (patch)
tree5bbed4a37b192146219a5e04c65ea29fc1800e20 /backport
parent0a4cd9bd740700db6e72da6d408d24ea50d224d7 (diff)
header: Add NL_SET_BAD_ATTR
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@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport')
-rw-r--r--backport/backport-include/linux/netlink.h7
1 files changed, 7 insertions, 0 deletions
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 */