Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Jan Engelhardt and committed by
David S. Miller
9ddd0ed0 de24b4eb

+14 -12
+1 -1
include/linux/netfilter/nf_conntrack_pptp.h
··· 4 4 5 5 #include <linux/netfilter/nf_conntrack_common.h> 6 6 7 - extern const char *pptp_msg_name[]; 7 + extern const char *const pptp_msg_name[]; 8 8 9 9 /* state of the control session */ 10 10 enum pptp_ctrlsess_state {
+5 -5
net/ipv4/netfilter/nf_nat_pptp.c
··· 40 40 static void pptp_nat_expected(struct nf_conn *ct, 41 41 struct nf_conntrack_expect *exp) 42 42 { 43 - struct nf_conn *master = ct->master; 43 + const struct nf_conn *master = ct->master; 44 44 struct nf_conntrack_expect *other_exp; 45 45 struct nf_conntrack_tuple t; 46 - struct nf_ct_pptp_master *ct_pptp_info; 47 - struct nf_nat_pptp *nat_pptp_info; 46 + const struct nf_ct_pptp_master *ct_pptp_info; 47 + const struct nf_nat_pptp *nat_pptp_info; 48 48 struct nf_nat_range range; 49 49 50 50 ct_pptp_info = &nfct_help(master)->help.ct_pptp_info; ··· 186 186 pptp_exp_gre(struct nf_conntrack_expect *expect_orig, 187 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 190 struct nf_ct_pptp_master *ct_pptp_info; 191 191 struct nf_nat_pptp *nat_pptp_info; 192 192 ··· 217 217 struct PptpControlHeader *ctlh, 218 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 221 u_int16_t msg; 222 222 __be16 new_pcid; 223 223 unsigned int pcid_off;
+8 -6
net/netfilter/nf_conntrack_pptp.c
··· 67 67 68 68 #ifdef DEBUG 69 69 /* PptpControlMessageType names */ 70 - const char *pptp_msg_name[] = { 70 + const char *const pptp_msg_name[] = { 71 71 "UNKNOWN_MESSAGE", 72 72 "START_SESSION_REQUEST", 73 73 "START_SESSION_REPLY", ··· 136 136 137 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 140 struct nf_conntrack_expect *exp; 141 141 struct nf_conn *sibling; 142 142 ··· 168 168 /* timeout GRE data connections */ 169 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 172 struct nf_conntrack_tuple t; 173 173 174 174 nf_ct_gre_keymap_destroy(ct); ··· 497 497 498 498 { 499 499 int dir = CTINFO2DIR(ctinfo); 500 - struct nf_ct_pptp_master *info = &nfct_help(ct)->help.ct_pptp_info; 501 - struct tcphdr _tcph, *tcph; 502 - struct pptp_pkt_hdr _pptph, *pptph; 500 + const struct nf_ct_pptp_master *info = &nfct_help(ct)->help.ct_pptp_info; 501 + const struct tcphdr *tcph; 502 + struct tcphdr _tcph; 503 + const struct pptp_pkt_hdr *pptph; 504 + struct pptp_pkt_hdr _pptph; 503 505 struct PptpControlHeader _ctlh, *ctlh; 504 506 union pptp_ctrl_union _pptpReq, *pptpReq; 505 507 unsigned int tcplen = skb->len - protoff;