From 3707fc2a5b140d73e344c6c52cde7e3cda4af876 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Thu, 9 May 2013 11:49:16 +0200 Subject: Backport nla_put_net64 --- kernel/include/linux/netfilter/ipset/ip_set_compat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'kernel') 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) -- cgit v1.2.3