diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/net/netfilter/nf_nat_helper.h | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/include/net/netfilter/nf_nat_helper.h b/include/net/netfilter/nf_nat_helper.h index 4222220920a5..02bb6c29dc3d 100644 --- a/include/net/netfilter/nf_nat_helper.h +++ b/include/net/netfilter/nf_nat_helper.h | |||
@@ -7,13 +7,27 @@ | |||
7 | struct sk_buff; | 7 | struct sk_buff; |
8 | 8 | ||
9 | /* These return true or false. */ | 9 | /* These return true or false. */ |
10 | extern int nf_nat_mangle_tcp_packet(struct sk_buff *skb, | 10 | extern int __nf_nat_mangle_tcp_packet(struct sk_buff *skb, |
11 | struct nf_conn *ct, | 11 | struct nf_conn *ct, |
12 | enum ip_conntrack_info ctinfo, | 12 | enum ip_conntrack_info ctinfo, |
13 | unsigned int match_offset, | 13 | unsigned int match_offset, |
14 | unsigned int match_len, | 14 | unsigned int match_len, |
15 | const char *rep_buffer, | 15 | const char *rep_buffer, |
16 | unsigned int rep_len); | 16 | unsigned int rep_len, bool adjust); |
17 | |||
18 | static inline int nf_nat_mangle_tcp_packet(struct sk_buff *skb, | ||
19 | struct nf_conn *ct, | ||
20 | enum ip_conntrack_info ctinfo, | ||
21 | unsigned int match_offset, | ||
22 | unsigned int match_len, | ||
23 | const char *rep_buffer, | ||
24 | unsigned int rep_len) | ||
25 | { | ||
26 | return __nf_nat_mangle_tcp_packet(skb, ct, ctinfo, | ||
27 | match_offset, match_len, | ||
28 | rep_buffer, rep_len, true); | ||
29 | } | ||
30 | |||
17 | extern int nf_nat_mangle_udp_packet(struct sk_buff *skb, | 31 | extern int nf_nat_mangle_udp_packet(struct sk_buff *skb, |
18 | struct nf_conn *ct, | 32 | struct nf_conn *ct, |
19 | enum ip_conntrack_info ctinfo, | 33 | enum ip_conntrack_info ctinfo, |
@@ -21,6 +35,10 @@ extern int nf_nat_mangle_udp_packet(struct sk_buff *skb, | |||
21 | unsigned int match_len, | 35 | unsigned int match_len, |
22 | const char *rep_buffer, | 36 | const char *rep_buffer, |
23 | unsigned int rep_len); | 37 | unsigned int rep_len); |
38 | |||
39 | extern void nf_nat_set_seq_adjust(struct nf_conn *ct, | ||
40 | enum ip_conntrack_info ctinfo, | ||
41 | __be32 seq, s16 off); | ||
24 | extern int nf_nat_seq_adjust(struct sk_buff *skb, | 42 | extern int nf_nat_seq_adjust(struct sk_buff *skb, |
25 | struct nf_conn *ct, | 43 | struct nf_conn *ct, |
26 | enum ip_conntrack_info ctinfo); | 44 | enum ip_conntrack_info ctinfo); |