diff options
author | Patrick McHardy <kaber@trash.net> | 2006-12-03 01:09:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-12-03 01:09:41 -0500 |
commit | f09943fefe6b702e40893d35b4f10fd1064037fe (patch) | |
tree | b170d046ecf0642471bb3c55d8e1f316fe9e5ddc /include/net | |
parent | 92703eee4ccde3c55ee067a89c373e8a51a8adf9 (diff) |
[NETFILTER]: nf_conntrack/nf_nat: add PPTP helper port
Add nf_conntrack port of the PPtP conntrack/NAT helper. Since there seems
to be no IPv6-capable PPtP implementation the helper only support IPv4.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netfilter/ipv4/nf_conntrack_ipv4.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 4 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_helper.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_tuple.h | 6 |
4 files changed, 14 insertions, 0 deletions
diff --git a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h index a1c57ee0a4fa..1401ccc051c4 100644 --- a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h +++ b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h | |||
@@ -11,10 +11,12 @@ | |||
11 | 11 | ||
12 | #ifdef CONFIG_NF_NAT_NEEDED | 12 | #ifdef CONFIG_NF_NAT_NEEDED |
13 | #include <net/netfilter/nf_nat.h> | 13 | #include <net/netfilter/nf_nat.h> |
14 | #include <linux/netfilter/nf_conntrack_pptp.h> | ||
14 | 15 | ||
15 | /* per conntrack: nat application helper private data */ | 16 | /* per conntrack: nat application helper private data */ |
16 | union nf_conntrack_nat_help { | 17 | union nf_conntrack_nat_help { |
17 | /* insert nat helper private data here */ | 18 | /* insert nat helper private data here */ |
19 | struct nf_nat_pptp nat_pptp_info; | ||
18 | }; | 20 | }; |
19 | 21 | ||
20 | struct nf_conn_nat { | 22 | struct nf_conn_nat { |
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 1646076933b1..032b36a0e378 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/netfilter/nf_conntrack_tcp.h> | 22 | #include <linux/netfilter/nf_conntrack_tcp.h> |
23 | #include <linux/netfilter/nf_conntrack_sctp.h> | 23 | #include <linux/netfilter/nf_conntrack_sctp.h> |
24 | #include <linux/netfilter/nf_conntrack_proto_gre.h> | ||
24 | #include <net/netfilter/ipv4/nf_conntrack_icmp.h> | 25 | #include <net/netfilter/ipv4/nf_conntrack_icmp.h> |
25 | #include <net/netfilter/ipv6/nf_conntrack_icmpv6.h> | 26 | #include <net/netfilter/ipv6/nf_conntrack_icmpv6.h> |
26 | 27 | ||
@@ -33,6 +34,7 @@ union nf_conntrack_proto { | |||
33 | struct ip_ct_tcp tcp; | 34 | struct ip_ct_tcp tcp; |
34 | struct ip_ct_icmp icmp; | 35 | struct ip_ct_icmp icmp; |
35 | struct nf_ct_icmpv6 icmpv6; | 36 | struct nf_ct_icmpv6 icmpv6; |
37 | struct nf_ct_gre gre; | ||
36 | }; | 38 | }; |
37 | 39 | ||
38 | union nf_conntrack_expect_proto { | 40 | union nf_conntrack_expect_proto { |
@@ -41,12 +43,14 @@ union nf_conntrack_expect_proto { | |||
41 | 43 | ||
42 | /* Add protocol helper include file here */ | 44 | /* Add protocol helper include file here */ |
43 | #include <linux/netfilter/nf_conntrack_ftp.h> | 45 | #include <linux/netfilter/nf_conntrack_ftp.h> |
46 | #include <linux/netfilter/nf_conntrack_pptp.h> | ||
44 | #include <linux/netfilter/nf_conntrack_h323.h> | 47 | #include <linux/netfilter/nf_conntrack_h323.h> |
45 | 48 | ||
46 | /* per conntrack: application helper private data */ | 49 | /* per conntrack: application helper private data */ |
47 | union nf_conntrack_help { | 50 | union nf_conntrack_help { |
48 | /* insert conntrack helper private data (master) here */ | 51 | /* insert conntrack helper private data (master) here */ |
49 | struct nf_ct_ftp_master ct_ftp_info; | 52 | struct nf_ct_ftp_master ct_ftp_info; |
53 | struct nf_ct_pptp_master ct_pptp_info; | ||
50 | struct nf_ct_h323_master ct_h323_info; | 54 | struct nf_ct_h323_master ct_h323_info; |
51 | }; | 55 | }; |
52 | 56 | ||
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h index fbba9e8b95fc..8c72ac9f0ab8 100644 --- a/include/net/netfilter/nf_conntrack_helper.h +++ b/include/net/netfilter/nf_conntrack_helper.h | |||
@@ -34,6 +34,8 @@ struct nf_conntrack_helper | |||
34 | struct nf_conn *ct, | 34 | struct nf_conn *ct, |
35 | enum ip_conntrack_info conntrackinfo); | 35 | enum ip_conntrack_info conntrackinfo); |
36 | 36 | ||
37 | void (*destroy)(struct nf_conn *ct); | ||
38 | |||
37 | int (*to_nfattr)(struct sk_buff *skb, const struct nf_conn *ct); | 39 | int (*to_nfattr)(struct sk_buff *skb, const struct nf_conn *ct); |
38 | }; | 40 | }; |
39 | 41 | ||
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h index c96a9c576736..5d72b16e876f 100644 --- a/include/net/netfilter/nf_conntrack_tuple.h +++ b/include/net/netfilter/nf_conntrack_tuple.h | |||
@@ -49,6 +49,9 @@ union nf_conntrack_man_proto | |||
49 | struct { | 49 | struct { |
50 | __be16 port; | 50 | __be16 port; |
51 | } sctp; | 51 | } sctp; |
52 | struct { | ||
53 | __be16 key; /* GRE key is 32bit, PPtP only uses 16bit */ | ||
54 | } gre; | ||
52 | }; | 55 | }; |
53 | 56 | ||
54 | /* The manipulable part of the tuple. */ | 57 | /* The manipulable part of the tuple. */ |
@@ -84,6 +87,9 @@ struct nf_conntrack_tuple | |||
84 | struct { | 87 | struct { |
85 | __be16 port; | 88 | __be16 port; |
86 | } sctp; | 89 | } sctp; |
90 | struct { | ||
91 | __be16 key; | ||
92 | } gre; | ||
87 | } u; | 93 | } u; |
88 | 94 | ||
89 | /* The protocol. */ | 95 | /* The protocol. */ |