History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next

Pablo Neira Ayuso says: ==================== nf-next pull request The following patchset contains Netfilter/IPVS updates for your net-next tree. Regarding nf_tables, most updates focus on consolidating the NAT infrastructure and adding support for masquerading. More specifically, they are: 1) use __u8 instead of u_int8_t in arptables header, from Mike Frysinger. 2) Add support to match by skb->pkttype to the meta expression, from Ana Rey. 3) Add support to match by cpu to the meta expression, also from Ana Rey. 4) A smatch warning about IPSET_ATTR_MARKMASK validation, patch from Vytas Dauksa. 5) Fix netnet and netportnet hash types the range support for IPv4, from Sergey Popovich. 6) Fix missing-field-initializer warnings resolved, from Mark Rustad. 7) Dan Carperter reported possible integer overflows in ipset, from Jozsef Kadlecsick. 8) Filter out accounting objects in nfacct by type, so you can selectively reset quotas, from Alexey Perevalov. 9) Move specific NAT IPv4 functions to the core so x_tables and nf_tables can share the same NAT IPv4 engine. 10) Use the new NAT IPv4 functions from nft_chain_nat_ipv4. 11) Move specific NAT IPv6 functions to the core so x_tables and nf_tables can share the same NAT IPv4 engine. 12) Use the new NAT IPv6 functions from nft_chain_nat_ipv6. 13) Refactor code to add nft_delrule(), which can be reused in the enhancement of the NFT_MSG_DELTABLE to remove a table and its content, from Arturo Borrero. 14) Add a helper function to unregister chain hooks, from Arturo Borrero. 15) A cleanup to rename to nft_delrule_by_chain for consistency with the new nft_*() functions, also from Arturo. 16) Add support to match devgroup to the meta expression, from Ana Rey. 17) Reduce stack usage for IPVS socket option, from Julian Anastasov. 18) Remove unnecessary textsearch state initialization in xt_string, from Bojan Prtvar. 19) Add several helper functions to nf_tables, more work to prepare the enhancement of NFT_MSG_DELTABLE, again from Arturo Borrero. 20) Enhance NFT_MSG_DELTABLE to delete a table and its content, from Arturo Borrero. 21) Support NAT flags in the nat expression to indicate the flavour, eg. random fully, from Arturo. 22) Add missing audit code to ebtables when replacing tables, from Nicolas Dichtel. 23) Generalize the IPv4 masquerading code to allow its re-use from nf_tables, from Arturo. 24) Generalize the IPv6 masquerading code, also from Arturo. 25) Add the new masq expression to support IPv4/IPv6 masquerading from nf_tables, also from Arturo. ====================

David S. Miller committed 12 years ago

Commit 0aac3832 parents b167a37 9ba1f7245 files · +1759 −1070Browse files

Showing the changes to include/uapi/linux (4 of 45 files). Show all

Unified · Split

4 files
  1. include/uapi/linux/netfilter/nf_nat.h +5 −0
  2. include/uapi/linux/netfilter/nf_tables.h +21 −0
  3. include/uapi/linux/netfilter/nfnetlink_acct.h +8 −0
  4. include/uapi/linux/netfilter_arp/arpt_mangle.h +1 −1
include/uapi/linux/netfilter/nf_nat.h+5−0
@@ -13,6 +13,11 @@ · 12 unmodified lines
1313 #define NF_NAT_RANGE_PROTO_RANDOM_ALL \
1414 (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY)
1515
16+#define NF_NAT_RANGE_MASK \
17+ (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \
18+ NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \
19+ NF_NAT_RANGE_PROTO_RANDOM_FULLY)
20+
1621 struct nf_nat_ipv4_range {
1722 unsigned int flags;
1823 __be32 min_ip;
include/uapi/linux/netfilter/nf_tables.h+21−0
@@ -571,6 +571,10 @@ enum nft_exthdr_attributes { · 570 unmodified lines
571571 * @NFT_META_L4PROTO: layer 4 protocol number
572572 * @NFT_META_BRI_IIFNAME: packet input bridge interface name
573573 * @NFT_META_BRI_OIFNAME: packet output bridge interface name
574+ * @NFT_META_PKTTYPE: packet type (skb->pkt_type), special handling for loopback
575+ * @NFT_META_CPU: cpu id through smp_processor_id()
576+ * @NFT_META_IIFGROUP: packet input interface group
577+ * @NFT_META_OIFGROUP: packet output interface group
574578 */
575579 enum nft_meta_keys {
576580 NFT_META_LEN,
@@ -592,6 +596,10 @@ enum nft_meta_keys { · 15 unmodified lines
592596 NFT_META_L4PROTO,
593597 NFT_META_BRI_IIFNAME,
594598 NFT_META_BRI_OIFNAME,
599+ NFT_META_PKTTYPE,
600+ NFT_META_CPU,
601+ NFT_META_IIFGROUP,
602+ NFT_META_OIFGROUP,
595603 };
596604
597605 /**
@@ -777,6 +785,7 @@ enum nft_nat_types { · 179 unmodified lines
777785 * @NFTA_NAT_REG_ADDR_MAX: source register of address range end (NLA_U32: nft_registers)
778786 * @NFTA_NAT_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
779787 * @NFTA_NAT_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers)
788+ * @NFTA_NAT_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)
780789 */
781790 enum nft_nat_attributes {
782791 NFTA_NAT_UNSPEC,
@@ -786,8 +795,20 @@ enum nft_nat_attributes { · 3 unmodified lines
786795 NFTA_NAT_REG_ADDR_MAX,
787796 NFTA_NAT_REG_PROTO_MIN,
788797 NFTA_NAT_REG_PROTO_MAX,
798+ NFTA_NAT_FLAGS,
789799 __NFTA_NAT_MAX
790800 };
791801 #define NFTA_NAT_MAX (__NFTA_NAT_MAX - 1)
792802
803+/**
804+ * enum nft_masq_attributes - nf_tables masquerade expression attributes
805+ *
806+ * @NFTA_MASQ_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)
807+ */
808+enum nft_masq_attributes {
809+ NFTA_MASQ_FLAGS,
810+ __NFTA_MASQ_MAX
811+};
812+#define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)
813+
793814 #endif /* _LINUX_NF_TABLES_H */
include/uapi/linux/netfilter/nfnetlink_acct.h+8−0
@@ -28,9 +28,17 @@ enum nfnl_acct_type { · 27 unmodified lines
2828 NFACCT_USE,
2929 NFACCT_FLAGS,
3030 NFACCT_QUOTA,
31+ NFACCT_FILTER,
3132 __NFACCT_MAX
3233 };
3334 #define NFACCT_MAX (__NFACCT_MAX - 1)
3435
36+enum nfnl_attr_filter_type {
37+ NFACCT_FILTER_UNSPEC,
38+ NFACCT_FILTER_MASK,
39+ NFACCT_FILTER_VALUE,
40+ __NFACCT_FILTER_MAX
41+};
42+#define NFACCT_FILTER_MAX (__NFACCT_FILTER_MAX - 1)
3543
3644 #endif /* _UAPI_NFNL_ACCT_H_ */
include/uapi/linux/netfilter_arp/arpt_mangle.h+1−1
@@ -13,7 +13,7 @@ struct arpt_mangle · 12 unmodified lines
1313 union {
1414 struct in_addr tgt_ip;
1515 } u_t;
16− u_int8_t flags;
16+ __u8 flags;
1717 int target;
1818 };
1919