Commit f703651ef870bd6b94ddc98ae07488b7d3fd9335
Committed by
Patrick McHardy
1 parent
6a4ddef2a3
Exists in
master
and in
7 other branches
netfilter: NFNL_SUBSYS_IPSET id and NLA_PUT_NET* macros
The patch adds the NFNL_SUBSYS_IPSET id and NLA_PUT_NET* macros to the vanilla kernel. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Patrick McHardy <kaber@trash.net>
Showing 2 changed files with 11 additions and 1 deletions Side-by-side Diff
include/linux/netfilter/nfnetlink.h
include/net/netlink.h
... | ... | @@ -856,17 +856,26 @@ |
856 | 856 | #define NLA_PUT_BE16(skb, attrtype, value) \ |
857 | 857 | NLA_PUT_TYPE(skb, __be16, attrtype, value) |
858 | 858 | |
859 | +#define NLA_PUT_NET16(skb, attrtype, value) \ | |
860 | + NLA_PUT_BE16(skb, attrtype | NLA_F_NET_BYTEORDER, value) | |
861 | + | |
859 | 862 | #define NLA_PUT_U32(skb, attrtype, value) \ |
860 | 863 | NLA_PUT_TYPE(skb, u32, attrtype, value) |
861 | 864 | |
862 | 865 | #define NLA_PUT_BE32(skb, attrtype, value) \ |
863 | 866 | NLA_PUT_TYPE(skb, __be32, attrtype, value) |
864 | 867 | |
868 | +#define NLA_PUT_NET32(skb, attrtype, value) \ | |
869 | + NLA_PUT_BE32(skb, attrtype | NLA_F_NET_BYTEORDER, value) | |
870 | + | |
865 | 871 | #define NLA_PUT_U64(skb, attrtype, value) \ |
866 | 872 | NLA_PUT_TYPE(skb, u64, attrtype, value) |
867 | 873 | |
868 | 874 | #define NLA_PUT_BE64(skb, attrtype, value) \ |
869 | 875 | NLA_PUT_TYPE(skb, __be64, attrtype, value) |
876 | + | |
877 | +#define NLA_PUT_NET64(skb, attrtype, value) \ | |
878 | + NLA_PUT_BE64(skb, attrtype | NLA_F_NET_BYTEORDER, value) | |
870 | 879 | |
871 | 880 | #define NLA_PUT_STRING(skb, attrtype, value) \ |
872 | 881 | NLA_PUT(skb, attrtype, strlen(value) + 1, value) |