diff options
Diffstat (limited to 'kernel/include/linux/netfilter/ipset/ip_set_compat.h.in')
-rw-r--r-- | kernel/include/linux/netfilter/ipset/ip_set_compat.h.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in index 02c2a37..8c0b346 100644 --- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in +++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in @@ -44,6 +44,7 @@ #@HAVE_LIST_NEXT_ENTRY@ HAVE_LIST_NEXT_ENTRY #@HAVE_ETHER_ADDR_COPY@ HAVE_ETHER_ADDR_COPY #@HAVE_NF_BRIDGE_GET_PHYSDEV@ HAVE_NF_BRIDGE_GET_PHYSDEV +#@HAVE_NLA_PUT_IN_ADDR@ HAVE_NLA_PUT_IN_ADDR /* Not everything could be moved here. Compatibility stuffs can be found in * xt_set.c, ip_set_core.c, ip_set_getport.c, pfxlen.c too. @@ -226,6 +227,20 @@ nf_bridge_get_physoutdev(const struct sk_buff *skb) #endif #endif +#ifndef HAVE_NLA_PUT_IN_ADDR +static inline int nla_put_in_addr(struct sk_buff *skb, int attrtype, + __be32 addr) +{ + return nla_put_be32(skb, attrtype, addr); +} + +static inline int nla_put_in6_addr(struct sk_buff *skb, int attrtype, + const struct in6_addr *addr) +{ + return nla_put(skb, attrtype, sizeof(*addr), addr); +} +#endif + #ifndef smp_mb__before_atomic #define smp_mb__before_atomic() smp_mb() #define smp_mb__after_atomic() smp_mb() |