]> granicus.if.org Git - ipset/commitdiff
Backport nla_put_net64
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 9 May 2013 09:49:16 +0000 (11:49 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 9 May 2013 09:49:16 +0000 (11:49 +0200)
kernel/include/linux/netfilter/ipset/ip_set_compat.h

index f5edef68d2ee06d09ff082ee4c81a12e65f2e17b..7c10816365423f4afc0500ed7a378e25fa3c3c34 100644 (file)
@@ -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)