diff options
author | Jan Engelhardt <jengelh@computergmbh.de> | 2008-01-31 07:51:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-31 22:28:09 -0500 |
commit | 9ddd0ed050445176a97e11b2b24d6fbc01843da6 (patch) | |
tree | 8306fd4303ca5571dabbbefd537cbd1cb79db5e5 /net | |
parent | de24b4ebb811fcd7879bc580eb5c6f095b566321 (diff) |
[NETFILTER]: nf_{conntrack,nat}_pptp: annotate PPtP helper with const
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/nf_nat_pptp.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_pptp.c | 14 |
2 files changed, 13 insertions, 11 deletions
diff --git a/net/ipv4/netfilter/nf_nat_pptp.c b/net/ipv4/netfilter/nf_nat_pptp.c index e63b944a2ebb..3a1e6d6afc0a 100644 --- a/net/ipv4/netfilter/nf_nat_pptp.c +++ b/net/ipv4/netfilter/nf_nat_pptp.c | |||
@@ -40,11 +40,11 @@ MODULE_ALIAS("ip_nat_pptp"); | |||
40 | static void pptp_nat_expected(struct nf_conn *ct, | 40 | static void pptp_nat_expected(struct nf_conn *ct, |
41 | struct nf_conntrack_expect *exp) | 41 | struct nf_conntrack_expect *exp) |
42 | { | 42 | { |
43 | struct nf_conn *master = ct->master; | 43 | const struct nf_conn *master = ct->master; |
44 | struct nf_conntrack_expect *other_exp; | 44 | struct nf_conntrack_expect *other_exp; |
45 | struct nf_conntrack_tuple t; | 45 | struct nf_conntrack_tuple t; |
46 | struct nf_ct_pptp_master *ct_pptp_info; | 46 | const struct nf_ct_pptp_master *ct_pptp_info; |
47 | struct nf_nat_pptp *nat_pptp_info; | 47 | const struct nf_nat_pptp *nat_pptp_info; |
48 | struct nf_nat_range range; | 48 | struct nf_nat_range range; |
49 | 49 | ||
50 | ct_pptp_info = &nfct_help(master)->help.ct_pptp_info; | 50 | ct_pptp_info = &nfct_help(master)->help.ct_pptp_info; |
@@ -186,7 +186,7 @@ static void | |||
186 | pptp_exp_gre(struct nf_conntrack_expect *expect_orig, | 186 | pptp_exp_gre(struct nf_conntrack_expect *expect_orig, |
187 | struct nf_conntrack_expect *expect_reply) | 187 | struct nf_conntrack_expect *expect_reply) |
188 | { | 188 | { |
189 | struct nf_conn *ct = expect_orig->master; | 189 | const struct nf_conn *ct = expect_orig->master; |
190 | struct nf_ct_pptp_master *ct_pptp_info; | 190 | struct nf_ct_pptp_master *ct_pptp_info; |
191 | struct nf_nat_pptp *nat_pptp_info; | 191 | struct nf_nat_pptp *nat_pptp_info; |
192 | 192 | ||
@@ -217,7 +217,7 @@ pptp_inbound_pkt(struct sk_buff *skb, | |||
217 | struct PptpControlHeader *ctlh, | 217 | struct PptpControlHeader *ctlh, |
218 | union pptp_ctrl_union *pptpReq) | 218 | union pptp_ctrl_union *pptpReq) |
219 | { | 219 | { |
220 | struct nf_nat_pptp *nat_pptp_info; | 220 | const struct nf_nat_pptp *nat_pptp_info; |
221 | u_int16_t msg; | 221 | u_int16_t msg; |
222 | __be16 new_pcid; | 222 | __be16 new_pcid; |
223 | unsigned int pcid_off; | 223 | unsigned int pcid_off; |
diff --git a/net/netfilter/nf_conntrack_pptp.c b/net/netfilter/nf_conntrack_pptp.c index 099b6df3e2b5..b5cb8e831230 100644 --- a/net/netfilter/nf_conntrack_pptp.c +++ b/net/netfilter/nf_conntrack_pptp.c | |||
@@ -67,7 +67,7 @@ EXPORT_SYMBOL_GPL(nf_nat_pptp_hook_expectfn); | |||
67 | 67 | ||
68 | #ifdef DEBUG | 68 | #ifdef DEBUG |
69 | /* PptpControlMessageType names */ | 69 | /* PptpControlMessageType names */ |
70 | const char *pptp_msg_name[] = { | 70 | const char *const pptp_msg_name[] = { |
71 | "UNKNOWN_MESSAGE", | 71 | "UNKNOWN_MESSAGE", |
72 | "START_SESSION_REQUEST", | 72 | "START_SESSION_REQUEST", |
73 | "START_SESSION_REPLY", | 73 | "START_SESSION_REPLY", |
@@ -136,7 +136,7 @@ static void pptp_expectfn(struct nf_conn *ct, | |||
136 | 136 | ||
137 | static int destroy_sibling_or_exp(const struct nf_conntrack_tuple *t) | 137 | static int destroy_sibling_or_exp(const struct nf_conntrack_tuple *t) |
138 | { | 138 | { |
139 | struct nf_conntrack_tuple_hash *h; | 139 | const struct nf_conntrack_tuple_hash *h; |
140 | struct nf_conntrack_expect *exp; | 140 | struct nf_conntrack_expect *exp; |
141 | struct nf_conn *sibling; | 141 | struct nf_conn *sibling; |
142 | 142 | ||
@@ -168,7 +168,7 @@ static int destroy_sibling_or_exp(const struct nf_conntrack_tuple *t) | |||
168 | /* timeout GRE data connections */ | 168 | /* timeout GRE data connections */ |
169 | static void pptp_destroy_siblings(struct nf_conn *ct) | 169 | static void pptp_destroy_siblings(struct nf_conn *ct) |
170 | { | 170 | { |
171 | struct nf_conn_help *help = nfct_help(ct); | 171 | const struct nf_conn_help *help = nfct_help(ct); |
172 | struct nf_conntrack_tuple t; | 172 | struct nf_conntrack_tuple t; |
173 | 173 | ||
174 | nf_ct_gre_keymap_destroy(ct); | 174 | nf_ct_gre_keymap_destroy(ct); |
@@ -497,9 +497,11 @@ conntrack_pptp_help(struct sk_buff *skb, unsigned int protoff, | |||
497 | 497 | ||
498 | { | 498 | { |
499 | int dir = CTINFO2DIR(ctinfo); | 499 | int dir = CTINFO2DIR(ctinfo); |
500 | struct nf_ct_pptp_master *info = &nfct_help(ct)->help.ct_pptp_info; | 500 | const struct nf_ct_pptp_master *info = &nfct_help(ct)->help.ct_pptp_info; |
501 | struct tcphdr _tcph, *tcph; | 501 | const struct tcphdr *tcph; |
502 | struct pptp_pkt_hdr _pptph, *pptph; | 502 | struct tcphdr _tcph; |
503 | const struct pptp_pkt_hdr *pptph; | ||
504 | struct pptp_pkt_hdr _pptph; | ||
503 | struct PptpControlHeader _ctlh, *ctlh; | 505 | struct PptpControlHeader _ctlh, *ctlh; |
504 | union pptp_ctrl_union _pptpReq, *pptpReq; | 506 | union pptp_ctrl_union _pptpReq, *pptpReq; |
505 | unsigned int tcplen = skb->len - protoff; | 507 | unsigned int tcplen = skb->len - protoff; |