Skip to content

Commit c5e1fd8

Browse files
committed
Merge branch 'nf-next' of git://1984.lsi.us.es/net-next
2 parents 60b778c + ceb98d0 commit c5e1fd8

59 files changed

Lines changed: 1168 additions & 378 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎include/linux/netfilter/Kbuild‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ header-y += nf_conntrack_ftp.h
55
header-y += nf_conntrack_sctp.h
66
header-y += nf_conntrack_tcp.h
77
header-y += nf_conntrack_tuple_common.h
8+
header-y += nf_nat.h
89
header-y += nfnetlink.h
10+
header-y += nfnetlink_acct.h
911
header-y += nfnetlink_compat.h
1012
header-y += nfnetlink_conntrack.h
1113
header-y += nfnetlink_log.h
@@ -21,6 +23,7 @@ header-y += xt_DSCP.h
2123
header-y += xt_IDLETIMER.h
2224
header-y += xt_LED.h
2325
header-y += xt_MARK.h
26+
header-y += xt_nfacct.h
2427
header-y += xt_NFLOG.h
2528
header-y += xt_NFQUEUE.h
2629
header-y += xt_RATEEST.h

‎include/linux/netfilter/nf_conntrack_common.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ enum ip_conntrack_status {
8383
/* Conntrack is a fake untracked entry */
8484
IPS_UNTRACKED_BIT = 12,
8585
IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT),
86+
87+
/* Conntrack has a userspace helper. */
88+
IPS_USERSPACE_HELPER_BIT = 13,
89+
IPS_USERSPACE_HELPER = (1 << IPS_USERSPACE_HELPER_BIT),
8690
};
8791

8892
/* Connection tracking event types */

‎include/linux/netfilter/nf_conntrack_tuple_common.h‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,33 @@ enum ip_conntrack_dir {
77
IP_CT_DIR_MAX
88
};
99

10+
/* The protocol-specific manipulable parts of the tuple: always in
11+
* network order
12+
*/
13+
union nf_conntrack_man_proto {
14+
/* Add other protocols here. */
15+
__be16 all;
16+
17+
struct {
18+
__be16 port;
19+
} tcp;
20+
struct {
21+
__be16 port;
22+
} udp;
23+
struct {
24+
__be16 id;
25+
} icmp;
26+
struct {
27+
__be16 port;
28+
} dccp;
29+
struct {
30+
__be16 port;
31+
} sctp;
32+
struct {
33+
__be16 key; /* GRE key is 32bit, PPtP only uses 16bit */
34+
} gre;
35+
};
36+
1037
#define CTINFO2DIR(ctinfo) ((ctinfo) >= IP_CT_IS_REPLY ? IP_CT_DIR_REPLY : IP_CT_DIR_ORIGINAL)
1138

1239
#endif /* _NF_CONNTRACK_TUPLE_COMMON_H */

‎include/linux/netfilter/nf_nat.h‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#ifndef _NETFILTER_NF_NAT_H
2+
#define _NETFILTER_NF_NAT_H
3+
4+
#include <linux/netfilter.h>
5+
#include <linux/netfilter/nf_conntrack_tuple_common.h>
6+
7+
#define NF_NAT_RANGE_MAP_IPS 1
8+
#define NF_NAT_RANGE_PROTO_SPECIFIED 2
9+
#define NF_NAT_RANGE_PROTO_RANDOM 4
10+
#define NF_NAT_RANGE_PERSISTENT 8
11+
12+
struct nf_nat_ipv4_range {
13+
unsigned int flags;
14+
__be32 min_ip;
15+
__be32 max_ip;
16+
union nf_conntrack_man_proto min;
17+
union nf_conntrack_man_proto max;
18+
};
19+
20+
struct nf_nat_ipv4_multi_range_compat {
21+
unsigned int rangesize;
22+
struct nf_nat_ipv4_range range[1];
23+
};
24+
25+
#endif /* _NETFILTER_NF_NAT_H */

‎include/linux/netfilter/nfnetlink.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ struct nfgenmsg {
4848
#define NFNL_SUBSYS_ULOG 4
4949
#define NFNL_SUBSYS_OSF 5
5050
#define NFNL_SUBSYS_IPSET 6
51-
#define NFNL_SUBSYS_COUNT 7
51+
#define NFNL_SUBSYS_ACCT 7
52+
#define NFNL_SUBSYS_COUNT 8
5253

5354
#ifdef __KERNEL__
5455

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#ifndef _NFNL_ACCT_H_
2+
#define _NFNL_ACCT_H_
3+
4+
#ifndef NFACCT_NAME_MAX
5+
#define NFACCT_NAME_MAX 32
6+
#endif
7+
8+
enum nfnl_acct_msg_types {
9+
NFNL_MSG_ACCT_NEW,
10+
NFNL_MSG_ACCT_GET,
11+
NFNL_MSG_ACCT_GET_CTRZERO,
12+
NFNL_MSG_ACCT_DEL,
13+
NFNL_MSG_ACCT_MAX
14+
};
15+
16+
enum nfnl_acct_type {
17+
NFACCT_UNSPEC,
18+
NFACCT_NAME,
19+
NFACCT_PKTS,
20+
NFACCT_BYTES,
21+
NFACCT_USE,
22+
__NFACCT_MAX
23+
};
24+
#define NFACCT_MAX (__NFACCT_MAX - 1)
25+
26+
#ifdef __KERNEL__
27+
28+
struct nf_acct;
29+
30+
extern struct nf_acct *nfnl_acct_find_get(const char *filter_name);
31+
extern void nfnl_acct_put(struct nf_acct *acct);
32+
extern void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct *nfacct);
33+
34+
#endif /* __KERNEL__ */
35+
36+
#endif /* _NFNL_ACCT_H */

‎include/linux/netfilter/xt_CT.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
#include <linux/types.h>
55

6-
#define XT_CT_NOTRACK 0x1
6+
#define XT_CT_NOTRACK 0x1
7+
#define XT_CT_USERSPACE_HELPER 0x2
78

89
struct xt_ct_target_info {
910
__u16 flags;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#ifndef _XT_NFACCT_MATCH_H
2+
#define _XT_NFACCT_MATCH_H
3+
4+
#include <linux/netfilter/nfnetlink_acct.h>
5+
6+
struct nf_acct;
7+
8+
struct xt_nfacct_match_info {
9+
char name[NFACCT_NAME_MAX];
10+
struct nf_acct *nfacct;
11+
};
12+
13+
#endif /* _XT_NFACCT_MATCH_H */
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#ifndef _XT_RPATH_H
2+
#define _XT_RPATH_H
3+
4+
#include <linux/types.h>
5+
6+
enum {
7+
XT_RPFILTER_LOOSE = 1 << 0,
8+
XT_RPFILTER_VALID_MARK = 1 << 1,
9+
XT_RPFILTER_ACCEPT_LOCAL = 1 << 2,
10+
XT_RPFILTER_INVERT = 1 << 3,
11+
#ifdef __KERNEL__
12+
XT_RPFILTER_OPTION_MASK = XT_RPFILTER_LOOSE |
13+
XT_RPFILTER_VALID_MARK |
14+
XT_RPFILTER_ACCEPT_LOCAL |
15+
XT_RPFILTER_INVERT,
16+
#endif
17+
};
18+
19+
struct xt_rpfilter_info {
20+
__u8 flags;
21+
};
22+
23+
#endif

‎include/linux/netfilter_ipv4/Kbuild‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ header-y += ipt_ah.h
1212
header-y += ipt_ecn.h
1313
header-y += ipt_realm.h
1414
header-y += ipt_ttl.h
15-
header-y += nf_nat.h

0 commit comments

Comments
 (0)