summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2013-05-09 11:49:16 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2013-05-09 11:49:16 +0200
commit3707fc2a5b140d73e344c6c52cde7e3cda4af876 (patch)
tree98cd1691407bf5a0102d215a42e20ae1a8e36367
parent81129ee213a148c13ea03308b1b95ba760ae9367 (diff)
Backport nla_put_net64
-rw-r--r--kernel/include/linux/netfilter/ipset/ip_set_compat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/include/linux/netfilter/ipset/ip_set_compat.h b/kernel/include/linux/netfilter/ipset/ip_set_compat.h
index f5edef6..7c10816 100644
--- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h
+++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h
@@ -43,6 +43,16 @@ static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
{
return !compare_ether_addr(addr1, addr2);
}
+
+static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value)
+{
+ return nla_put(skb, attrtype, sizeof(__be64), &value);
+}
+
+static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value)
+{
+ return nla_put_be64(skb, attrtype | NLA_F_NET_BYTEORDER, value);
+}
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0)