History

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

Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter/IPVS updates for your net-next tree. This batch comes with more input sanitization for xtables to address bug reports from fuzzers, preparation works to the flowtable infrastructure and assorted updates. In no particular order, they are: 1) Make sure userspace provides a valid standard target verdict, from Florian Westphal. 2) Sanitize error target size, also from Florian. 3) Validate that last rule in basechain matches underflow/policy since userspace assumes this when decoding the ruleset blob that comes from the kernel, from Florian. 4) Consolidate hook entry checks through xt_check_table_hooks(), patch from Florian. 5) Cap ruleset allocations at 512 mbytes, 134217728 rules and reject very large compat offset arrays, so we have a reasonable upper limit and fuzzers don't exercise the oom-killer. Patches from Florian. 6) Several WARN_ON checks on xtables mutex helper, from Florian. 7) xt_rateest now has a hashtable per net, from Cong Wang. 8) Consolidate counter allocation in xt_counters_alloc(), from Florian. 9) Earlier xt_table_unlock() call in {ip,ip6,arp,eb}tables, patch from Xin Long. 10) Set FLOW_OFFLOAD_DIR_* to IP_CT_DIR_* definitions, patch from Felix Fietkau. 11) Consolidate code through flow_offload_fill_dir(), also from Felix. 12) Inline ip6_dst_mtu_forward() just like ip_dst_mtu_maybe_forward() to remove a dependency with flowtable and ipv6.ko, from Felix. 13) Cache mtu size in flow_offload_tuple object, this is safe for forwarding as f87c10a8aa1e describes, from Felix. 14) Rename nf_flow_table.c to nf_flow_table_core.o, to simplify too modular infrastructure, from Felix. 15) Add rt0, rt2 and rt4 IPv6 routing extension support, patch from Ahmed Abdelsalam. 16) Remove unused parameter in nf_conncount_count(), from Yi-Hung Wei. 17) Support for counting only to nf_conncount infrastructure, patch from Yi-Hung Wei. 18) Add strict NFT_CT_{SRC_IP,DST_IP,SRC_IP6,DST_IP6} key datatypes to nft_ct. 19) Use boolean as return value from ipt_ah and from IPVS too, patch from Gustavo A. R. Silva. 20) Remove useless parameters in nfnl_acct_overquota() and nf_conntrack_broadcast_help(), from Taehee Yoo. 21) Use ipv6_addr_is_multicast() from xt_cluster, also from Taehee Yoo. 22) Statify nf_tables_obj_lookup_byhandle, patch from Fengguang Wu. 23) Fix typo in xt_limit, from Geert Uytterhoeven. 24) Do no use VLAs in Netfilter code, again from Gustavo. 25) Use ADD_COUNTER from ebtables, from Taehee Yoo. 26) Bitshift support for CONNMARK and MARK targets, from Jack Ma. 27) Use pr_*() and add pr_fmt(), from Arushi Singhal. 28) Add synproxy support to ctnetlink. 29) ICMP type and IGMP matching support for ebtables, patches from Matthias Schiffer. 30) Support for the revision infrastructure to ebtables, from Bernie Harris. 31) String match support for ebtables, also from Bernie. 32) Documentation for the new flowtable infrastructure. 33) Use generic comparison functions in ebt_stp, from Joe Perches. 34) Demodularize filter chains in nftables. 35) Register conntrack hooks in case nftables NAT chain is added. 36) Merge assignments with return in a couple of spots in the Netfilter codebase, also from Arushi. 37) Document that xtables percpu counters are stored in the same memory area, from Ben Hutchings. 38) Revert mark_source_chains() sanity checks that break existing rulesets, from Florian Westphal. 39) Use is_zero_ether_addr() in the ipset codebase, from Joe Perches. ====================

David S. Miller committed 8 years ago

Commit d1621902 parents b9a1260 26c97c575 files · +1383 −858Browse files

Showing the changes to include/uapi/linux (6 of 75 files). Show all

Unified · Split

6 files
  1. include/uapi/linux/netfilter/nf_conntrack_common.h +1 −0
  2. include/uapi/linux/netfilter/nf_tables.h +10 −2
  3. include/uapi/linux/netfilter/nfnetlink_conntrack.h +10 −0
  4. include/uapi/linux/netfilter/xt_connmark.h +10 −0
  5. include/uapi/linux/netfilter_bridge/ebt_ip.h +12 −3
  6. include/uapi/linux/netfilter_bridge/ebtables.h +13 −3
include/uapi/linux/netfilter/nf_conntrack_common.h+1−0
@@ -129,6 +129,7 @@ enum ip_conntrack_events { · 128 unmodified lines
129129 IPCT_NATSEQADJ = IPCT_SEQADJ,
130130 IPCT_SECMARK, /* new security mark has been set */
131131 IPCT_LABEL, /* new connlabel has been set */
132+ IPCT_SYNPROXY, /* synproxy has been set */
132133 #ifdef __KERNEL__
133134 __IPCT_MAX
134135 #endif
include/uapi/linux/netfilter/nf_tables.h+10−2
@@ -909,8 +909,8 @@ enum nft_rt_attributes { · 908 unmodified lines
909909 * @NFT_CT_EXPIRATION: relative conntrack expiration time in ms
910910 * @NFT_CT_HELPER: connection tracking helper assigned to conntrack
911911 * @NFT_CT_L3PROTOCOL: conntrack layer 3 protocol
912− * @NFT_CT_SRC: conntrack layer 3 protocol source (IPv4/IPv6 address)
913− * @NFT_CT_DST: conntrack layer 3 protocol destination (IPv4/IPv6 address)
912+ * @NFT_CT_SRC: conntrack layer 3 protocol source (IPv4/IPv6 address, deprecated)
913+ * @NFT_CT_DST: conntrack layer 3 protocol destination (IPv4/IPv6 address, deprecated)
914914 * @NFT_CT_PROTOCOL: conntrack layer 4 protocol
915915 * @NFT_CT_PROTO_SRC: conntrack layer 4 protocol source
916916 * @NFT_CT_PROTO_DST: conntrack layer 4 protocol destination
@@ -920,6 +920,10 @@ enum nft_rt_attributes { · 3 unmodified lines
920920 * @NFT_CT_AVGPKT: conntrack average bytes per packet
921921 * @NFT_CT_ZONE: conntrack zone
922922 * @NFT_CT_EVENTMASK: ctnetlink events to be generated for this conntrack
923+ * @NFT_CT_SRC_IP: conntrack layer 3 protocol source (IPv4 address)
924+ * @NFT_CT_DST_IP: conntrack layer 3 protocol destination (IPv4 address)
925+ * @NFT_CT_SRC_IP6: conntrack layer 3 protocol source (IPv6 address)
926+ * @NFT_CT_DST_IP6: conntrack layer 3 protocol destination (IPv6 address)
923927 */
924928 enum nft_ct_keys {
925929 NFT_CT_STATE,
@@ -941,6 +945,10 @@ enum nft_ct_keys { · 15 unmodified lines
941945 NFT_CT_AVGPKT,
942946 NFT_CT_ZONE,
943947 NFT_CT_EVENTMASK,
948+ NFT_CT_SRC_IP,
949+ NFT_CT_DST_IP,
950+ NFT_CT_SRC_IP6,
951+ NFT_CT_DST_IP6,
944952 };
945953
946954 /**
include/uapi/linux/netfilter/nfnetlink_conntrack.h+10−0
@@ -54,6 +54,7 @@ enum ctattr_type { · 53 unmodified lines
5454 CTA_MARK_MASK,
5555 CTA_LABELS,
5656 CTA_LABELS_MASK,
57+ CTA_SYNPROXY,
5758 __CTA_MAX
5859 };
5960 #define CTA_MAX (__CTA_MAX - 1)
@@ -190,6 +191,15 @@ enum ctattr_natseq { · 130 unmodified lines
190191 };
191192 #define CTA_NAT_SEQ_MAX (__CTA_NAT_SEQ_MAX - 1)
192193
194+enum ctattr_synproxy {
195+ CTA_SYNPROXY_UNSPEC,
196+ CTA_SYNPROXY_ISN,
197+ CTA_SYNPROXY_ITS,
198+ CTA_SYNPROXY_TSOFF,
199+ __CTA_SYNPROXY_MAX,
200+};
201+#define CTA_SYNPROXY_MAX (__CTA_SYNPROXY_MAX - 1)
202+
193203 enum ctattr_expect {
194204 CTA_EXPECT_UNSPEC,
195205 CTA_EXPECT_MASTER,
include/uapi/linux/netfilter/xt_connmark.h+10−0
@@ -19,11 +19,21 @@ enum { · 18 unmodified lines
1919 XT_CONNMARK_RESTORE
2020 };
2121
22+enum {
23+ D_SHIFT_LEFT = 0,
24+ D_SHIFT_RIGHT,
25+};
26+
2227 struct xt_connmark_tginfo1 {
2328 __u32 ctmark, ctmask, nfmask;
2429 __u8 mode;
2530 };
2631
32+struct xt_connmark_tginfo2 {
33+ __u32 ctmark, ctmask, nfmask;
34+ __u8 shift_dir, shift_bits, mode;
35+};
36+
2737 struct xt_connmark_mtinfo1 {
2838 __u32 mark, mask;
2939 __u8 invert;
include/uapi/linux/netfilter_bridge/ebt_ip.h+12−3
@@ -24,8 +24,10 @@ · 23 unmodified lines
2424 #define EBT_IP_PROTO 0x08
2525 #define EBT_IP_SPORT 0x10
2626 #define EBT_IP_DPORT 0x20
27+#define EBT_IP_ICMP 0x40
28+#define EBT_IP_IGMP 0x80
2729 #define EBT_IP_MASK (EBT_IP_SOURCE | EBT_IP_DEST | EBT_IP_TOS | EBT_IP_PROTO |\
28− EBT_IP_SPORT | EBT_IP_DPORT )
30+ EBT_IP_SPORT | EBT_IP_DPORT | EBT_IP_ICMP | EBT_IP_IGMP)
2931 #define EBT_IP_MATCH "ip"
3032
3133 /* the same values are used for the invflags */
@@ -38,8 +40,15 @@ struct ebt_ip_info { · 6 unmodified lines
3840 __u8 protocol;
3941 __u8 bitmask;
4042 __u8 invflags;
41− __u16 sport[2];
42− __u16 dport[2];
43+ union {
44+ __u16 sport[2];
45+ __u8 icmp_type[2];
46+ __u8 igmp_type[2];
47+ };
48+ union {
49+ __u16 dport[2];
50+ __u8 icmp_code[2];
51+ };
4352 };
4453
4554 #endif
include/uapi/linux/netfilter_bridge/ebtables.h+13−3
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020 #define EBT_TABLE_MAXNAMELEN 32
2121 #define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN
2222 #define EBT_FUNCTION_MAXNAMELEN EBT_TABLE_MAXNAMELEN
23+#define EBT_EXTENSION_MAXNAMELEN 31
2324
2425 /* verdicts >0 are "branches" */
2526 #define EBT_ACCEPT -1
@@ -120,7 +121,10 @@ struct ebt_entries { · 94 unmodified lines
120121
121122 struct ebt_entry_match {
122123 union {
123− char name[EBT_FUNCTION_MAXNAMELEN];
124+ struct {
125+ char name[EBT_EXTENSION_MAXNAMELEN];
126+ uint8_t revision;
127+ };
124128 struct xt_match *match;
125129 } u;
126130 /* size of data */
@@ -130,7 +134,10 @@ struct ebt_entry_match { · 3 unmodified lines
130134
131135 struct ebt_entry_watcher {
132136 union {
133− char name[EBT_FUNCTION_MAXNAMELEN];
137+ struct {
138+ char name[EBT_EXTENSION_MAXNAMELEN];
139+ uint8_t revision;
140+ };
134141 struct xt_target *watcher;
135142 } u;
136143 /* size of data */
@@ -140,7 +147,10 @@ struct ebt_entry_watcher { · 3 unmodified lines
140147
141148 struct ebt_entry_target {
142149 union {
143− char name[EBT_FUNCTION_MAXNAMELEN];
150+ struct {
151+ char name[EBT_EXTENSION_MAXNAMELEN];
152+ uint8_t revision;
153+ };
144154 struct xt_target *target;
145155 } u;
146156 /* size of data */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t