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 updates for your net-next tree, they are: * Add full port randomization support. Some crazy researchers found a way to reconstruct the secure ephemeral ports that are allocated in random mode by sending off-path bursts of UDP packets to overrun the socket buffer of the DNS resolver to trigger retransmissions, then if the timing for the DNS resolution done by a client is larger than usual, then they conclude that the port that received the burst of UDP packets is the one that was opened. It seems a bit aggressive method to me but it seems to work for them. As a result, Daniel Borkmann and Hannes Frederic Sowa came up with a new NAT mode to fully randomize ports using prandom. * Add a new classifier to x_tables based on the socket net_cls set via cgroups. These includes two patches to prepare the field as requested by Zefan Li. Also from Daniel Borkmann. * Use prandom instead of get_random_bytes in several locations of the netfilter code, from Florian Westphal. * Allow to use the CTA_MARK_MASK in ctnetlink when mangling the conntrack mark, also from Florian Westphal. * Fix compilation warning due to unused variable in IPVS, from Geert Uytterhoeven. * Add support for UID/GID via nfnetlink_queue, from Valentina Giusti. * Add IPComp extension to x_tables, from Fan Du. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
855404efae
42 changed files with 487 additions and 274 deletions
|
|
@ -39,6 +39,7 @@ header-y += xt_TEE.h
|
|||
header-y += xt_TPROXY.h
|
||||
header-y += xt_addrtype.h
|
||||
header-y += xt_bpf.h
|
||||
header-y += xt_cgroup.h
|
||||
header-y += xt_cluster.h
|
||||
header-y += xt_comment.h
|
||||
header-y += xt_connbytes.h
|
||||
|
|
@ -54,6 +55,7 @@ header-y += xt_ecn.h
|
|||
header-y += xt_esp.h
|
||||
header-y += xt_hashlimit.h
|
||||
header-y += xt_helper.h
|
||||
header-y += xt_ipcomp.h
|
||||
header-y += xt_iprange.h
|
||||
header-y += xt_ipvs.h
|
||||
header-y += xt_length.h
|
||||
|
|
|
|||
|
|
@ -4,10 +4,14 @@
|
|||
#include <linux/netfilter.h>
|
||||
#include <linux/netfilter/nf_conntrack_tuple_common.h>
|
||||
|
||||
#define NF_NAT_RANGE_MAP_IPS 1
|
||||
#define NF_NAT_RANGE_PROTO_SPECIFIED 2
|
||||
#define NF_NAT_RANGE_PROTO_RANDOM 4
|
||||
#define NF_NAT_RANGE_PERSISTENT 8
|
||||
#define NF_NAT_RANGE_MAP_IPS (1 << 0)
|
||||
#define NF_NAT_RANGE_PROTO_SPECIFIED (1 << 1)
|
||||
#define NF_NAT_RANGE_PROTO_RANDOM (1 << 2)
|
||||
#define NF_NAT_RANGE_PERSISTENT (1 << 3)
|
||||
#define NF_NAT_RANGE_PROTO_RANDOM_FULLY (1 << 4)
|
||||
|
||||
#define NF_NAT_RANGE_PROTO_RANDOM_ALL \
|
||||
(NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY)
|
||||
|
||||
struct nf_nat_ipv4_range {
|
||||
unsigned int flags;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ enum nfqnl_attr_type {
|
|||
NFQA_CAP_LEN, /* __u32 length of captured packet */
|
||||
NFQA_SKB_INFO, /* __u32 skb meta information */
|
||||
NFQA_EXP, /* nf_conntrack_netlink.h */
|
||||
NFQA_UID, /* __u32 sk uid */
|
||||
NFQA_GID, /* __u32 sk gid */
|
||||
|
||||
__NFQA_MAX
|
||||
};
|
||||
|
|
@ -99,7 +101,8 @@ enum nfqnl_attr_config {
|
|||
#define NFQA_CFG_F_FAIL_OPEN (1 << 0)
|
||||
#define NFQA_CFG_F_CONNTRACK (1 << 1)
|
||||
#define NFQA_CFG_F_GSO (1 << 2)
|
||||
#define NFQA_CFG_F_MAX (1 << 3)
|
||||
#define NFQA_CFG_F_UID_GID (1 << 3)
|
||||
#define NFQA_CFG_F_MAX (1 << 4)
|
||||
|
||||
/* flags for NFQA_SKB_INFO */
|
||||
/* packet appears to have wrong checksums, but they are ok */
|
||||
|
|
|
|||
11
include/uapi/linux/netfilter/xt_cgroup.h
Normal file
11
include/uapi/linux/netfilter/xt_cgroup.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef _UAPI_XT_CGROUP_H
|
||||
#define _UAPI_XT_CGROUP_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct xt_cgroup_info {
|
||||
__u32 id;
|
||||
__u32 invert;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_XT_CGROUP_H */
|
||||
16
include/uapi/linux/netfilter/xt_ipcomp.h
Normal file
16
include/uapi/linux/netfilter/xt_ipcomp.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef _XT_IPCOMP_H
|
||||
#define _XT_IPCOMP_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct xt_ipcomp {
|
||||
__u32 spis[2]; /* Security Parameter Index */
|
||||
__u8 invflags; /* Inverse flags */
|
||||
__u8 hdrres; /* Test of the Reserved Filed */
|
||||
};
|
||||
|
||||
/* Values for "invflags" field in struct xt_ipcomp. */
|
||||
#define XT_IPCOMP_INV_SPI 0x01 /* Invert the sense of spi. */
|
||||
#define XT_IPCOMP_INV_MASK 0x01 /* All possible flags. */
|
||||
|
||||
#endif /*_XT_IPCOMP_H*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue