diff options
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_reasm.c | 8 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_amanda.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_ftp.c | 5 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_helper.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_irc.c | 14 |
5 files changed, 17 insertions, 14 deletions
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 9e5f305b2022..2dccad48058c 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -103,8 +103,8 @@ struct ctl_table nf_ct_ipv6_sysctl_table[] = { | |||
103 | }; | 103 | }; |
104 | #endif | 104 | #endif |
105 | 105 | ||
106 | static unsigned int ip6qhashfn(__be32 id, struct in6_addr *saddr, | 106 | static unsigned int ip6qhashfn(__be32 id, const struct in6_addr *saddr, |
107 | struct in6_addr *daddr) | 107 | const struct in6_addr *daddr) |
108 | { | 108 | { |
109 | u32 a, b, c; | 109 | u32 a, b, c; |
110 | 110 | ||
@@ -132,7 +132,7 @@ static unsigned int ip6qhashfn(__be32 id, struct in6_addr *saddr, | |||
132 | 132 | ||
133 | static unsigned int nf_hashfn(struct inet_frag_queue *q) | 133 | static unsigned int nf_hashfn(struct inet_frag_queue *q) |
134 | { | 134 | { |
135 | struct nf_ct_frag6_queue *nq; | 135 | const struct nf_ct_frag6_queue *nq; |
136 | 136 | ||
137 | nq = container_of(q, struct nf_ct_frag6_queue, q); | 137 | nq = container_of(q, struct nf_ct_frag6_queue, q); |
138 | return ip6qhashfn(nq->id, &nq->saddr, &nq->daddr); | 138 | return ip6qhashfn(nq->id, &nq->saddr, &nq->daddr); |
@@ -222,7 +222,7 @@ oom: | |||
222 | 222 | ||
223 | 223 | ||
224 | static int nf_ct_frag6_queue(struct nf_ct_frag6_queue *fq, struct sk_buff *skb, | 224 | static int nf_ct_frag6_queue(struct nf_ct_frag6_queue *fq, struct sk_buff *skb, |
225 | struct frag_hdr *fhdr, int nhoff) | 225 | const struct frag_hdr *fhdr, int nhoff) |
226 | { | 226 | { |
227 | struct sk_buff *prev, *next; | 227 | struct sk_buff *prev, *next; |
228 | int offset, end; | 228 | int offset, end; |
diff --git a/net/netfilter/nf_conntrack_amanda.c b/net/netfilter/nf_conntrack_amanda.c index d14585a19b7d..ddfac99cbe63 100644 --- a/net/netfilter/nf_conntrack_amanda.c +++ b/net/netfilter/nf_conntrack_amanda.c | |||
@@ -53,7 +53,7 @@ enum amanda_strings { | |||
53 | }; | 53 | }; |
54 | 54 | ||
55 | static struct { | 55 | static struct { |
56 | char *string; | 56 | const char *string; |
57 | size_t len; | 57 | size_t len; |
58 | struct ts_config *ts; | 58 | struct ts_config *ts; |
59 | } search[] __read_mostly = { | 59 | } search[] __read_mostly = { |
diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c index 7eff876bb8bc..87ca39b353bb 100644 --- a/net/netfilter/nf_conntrack_ftp.c +++ b/net/netfilter/nf_conntrack_ftp.c | |||
@@ -350,8 +350,9 @@ static int help(struct sk_buff *skb, | |||
350 | enum ip_conntrack_info ctinfo) | 350 | enum ip_conntrack_info ctinfo) |
351 | { | 351 | { |
352 | unsigned int dataoff, datalen; | 352 | unsigned int dataoff, datalen; |
353 | struct tcphdr _tcph, *th; | 353 | const struct tcphdr *th; |
354 | char *fb_ptr; | 354 | struct tcphdr _tcph; |
355 | const char *fb_ptr; | ||
355 | int ret; | 356 | int ret; |
356 | u32 seq; | 357 | u32 seq; |
357 | int dir = CTINFO2DIR(ctinfo); | 358 | int dir = CTINFO2DIR(ctinfo); |
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c index e350f56d43c9..7d1b11703741 100644 --- a/net/netfilter/nf_conntrack_helper.c +++ b/net/netfilter/nf_conntrack_helper.c | |||
@@ -126,7 +126,7 @@ void nf_conntrack_helper_unregister(struct nf_conntrack_helper *me) | |||
126 | { | 126 | { |
127 | struct nf_conntrack_tuple_hash *h; | 127 | struct nf_conntrack_tuple_hash *h; |
128 | struct nf_conntrack_expect *exp; | 128 | struct nf_conntrack_expect *exp; |
129 | struct hlist_node *n, *next; | 129 | const struct hlist_node *n, *next; |
130 | unsigned int i; | 130 | unsigned int i; |
131 | 131 | ||
132 | mutex_lock(&nf_ct_helper_mutex); | 132 | mutex_lock(&nf_ct_helper_mutex); |
diff --git a/net/netfilter/nf_conntrack_irc.c b/net/netfilter/nf_conntrack_irc.c index 02f21cbe5ae7..1b1226d6653f 100644 --- a/net/netfilter/nf_conntrack_irc.c +++ b/net/netfilter/nf_conntrack_irc.c | |||
@@ -50,7 +50,7 @@ MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per " | |||
50 | module_param(dcc_timeout, uint, 0400); | 50 | module_param(dcc_timeout, uint, 0400); |
51 | MODULE_PARM_DESC(dcc_timeout, "timeout on for unestablished DCC channels"); | 51 | MODULE_PARM_DESC(dcc_timeout, "timeout on for unestablished DCC channels"); |
52 | 52 | ||
53 | static const char *dccprotos[] = { | 53 | static const char *const dccprotos[] = { |
54 | "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " | 54 | "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " |
55 | }; | 55 | }; |
56 | 56 | ||
@@ -65,7 +65,7 @@ static const char *dccprotos[] = { | |||
65 | * ad_beg_p returns pointer to first byte of addr data | 65 | * ad_beg_p returns pointer to first byte of addr data |
66 | * ad_end_p returns pointer to last byte of addr data | 66 | * ad_end_p returns pointer to last byte of addr data |
67 | */ | 67 | */ |
68 | static int parse_dcc(char *data, char *data_end, u_int32_t *ip, | 68 | static int parse_dcc(char *data, const char *data_end, u_int32_t *ip, |
69 | u_int16_t *port, char **ad_beg_p, char **ad_end_p) | 69 | u_int16_t *port, char **ad_beg_p, char **ad_end_p) |
70 | { | 70 | { |
71 | /* at least 12: "AAAAAAAA P\1\n" */ | 71 | /* at least 12: "AAAAAAAA P\1\n" */ |
@@ -93,9 +93,11 @@ static int help(struct sk_buff *skb, unsigned int protoff, | |||
93 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) | 93 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) |
94 | { | 94 | { |
95 | unsigned int dataoff; | 95 | unsigned int dataoff; |
96 | struct iphdr *iph; | 96 | const struct iphdr *iph; |
97 | struct tcphdr _tcph, *th; | 97 | const struct tcphdr *th; |
98 | char *data, *data_limit, *ib_ptr; | 98 | struct tcphdr _tcph; |
99 | const char *data_limit; | ||
100 | char *data, *ib_ptr; | ||
99 | int dir = CTINFO2DIR(ctinfo); | 101 | int dir = CTINFO2DIR(ctinfo); |
100 | struct nf_conntrack_expect *exp; | 102 | struct nf_conntrack_expect *exp; |
101 | struct nf_conntrack_tuple *tuple; | 103 | struct nf_conntrack_tuple *tuple; |
@@ -159,7 +161,7 @@ static int help(struct sk_buff *skb, unsigned int protoff, | |||
159 | /* we have at least | 161 | /* we have at least |
160 | * (19+MINMATCHLEN)-5-dccprotos[i].matchlen bytes valid | 162 | * (19+MINMATCHLEN)-5-dccprotos[i].matchlen bytes valid |
161 | * data left (== 14/13 bytes) */ | 163 | * data left (== 14/13 bytes) */ |
162 | if (parse_dcc((char *)data, data_limit, &dcc_ip, | 164 | if (parse_dcc(data, data_limit, &dcc_ip, |
163 | &dcc_port, &addr_beg_p, &addr_end_p)) { | 165 | &dcc_port, &addr_beg_p, &addr_end_p)) { |
164 | pr_debug("unable to parse dcc command\n"); | 166 | pr_debug("unable to parse dcc command\n"); |
165 | continue; | 167 | continue; |