Commit 4f2f6f23 authored by Jan Engelhardt's avatar Jan Engelhardt

netfilter: xtables: fix const inconsistency

Signed-off-by: default avatarJan Engelhardt <jengelh@medozas.de>
parent ccf5bd8c
...@@ -238,8 +238,8 @@ static struct nf_loginfo trace_loginfo = { ...@@ -238,8 +238,8 @@ static struct nf_loginfo trace_loginfo = {
/* Mildly perf critical (only if packet tracing is on) */ /* Mildly perf critical (only if packet tracing is on) */
static inline int static inline int
get_chainname_rulenum(struct ipt_entry *s, struct ipt_entry *e, get_chainname_rulenum(struct ipt_entry *s, struct ipt_entry *e,
char *hookname, char **chainname, const char *hookname, const char **chainname,
char **comment, unsigned int *rulenum) const char **comment, unsigned int *rulenum)
{ {
struct ipt_standard_target *t = (void *)ipt_get_target(s); struct ipt_standard_target *t = (void *)ipt_get_target(s);
...@@ -257,8 +257,8 @@ get_chainname_rulenum(struct ipt_entry *s, struct ipt_entry *e, ...@@ -257,8 +257,8 @@ get_chainname_rulenum(struct ipt_entry *s, struct ipt_entry *e,
&& unconditional(&s->ip)) { && unconditional(&s->ip)) {
/* Tail of chains: STANDARD target (return/policy) */ /* Tail of chains: STANDARD target (return/policy) */
*comment = *chainname == hookname *comment = *chainname == hookname
? (char *)comments[NF_IP_TRACE_COMMENT_POLICY] ? comments[NF_IP_TRACE_COMMENT_POLICY]
: (char *)comments[NF_IP_TRACE_COMMENT_RETURN]; : comments[NF_IP_TRACE_COMMENT_RETURN];
} }
return 1; return 1;
} else } else
...@@ -277,14 +277,14 @@ static void trace_packet(struct sk_buff *skb, ...@@ -277,14 +277,14 @@ static void trace_packet(struct sk_buff *skb,
{ {
void *table_base; void *table_base;
const struct ipt_entry *root; const struct ipt_entry *root;
char *hookname, *chainname, *comment; const char *hookname, *chainname, *comment;
unsigned int rulenum = 0; unsigned int rulenum = 0;
table_base = private->entries[smp_processor_id()]; table_base = private->entries[smp_processor_id()];
root = get_entry(table_base, private->hook_entry[hook]); root = get_entry(table_base, private->hook_entry[hook]);
hookname = chainname = (char *)hooknames[hook]; hookname = chainname = hooknames[hook];
comment = (char *)comments[NF_IP_TRACE_COMMENT_RULE]; comment = comments[NF_IP_TRACE_COMMENT_RULE];
IPT_ENTRY_ITERATE(root, IPT_ENTRY_ITERATE(root,
private->size - private->hook_entry[hook], private->size - private->hook_entry[hook],
......
...@@ -270,8 +270,8 @@ static struct nf_loginfo trace_loginfo = { ...@@ -270,8 +270,8 @@ static struct nf_loginfo trace_loginfo = {
/* Mildly perf critical (only if packet tracing is on) */ /* Mildly perf critical (only if packet tracing is on) */
static inline int static inline int
get_chainname_rulenum(struct ip6t_entry *s, struct ip6t_entry *e, get_chainname_rulenum(struct ip6t_entry *s, struct ip6t_entry *e,
char *hookname, char **chainname, const char *hookname, const char **chainname,
char **comment, unsigned int *rulenum) const char **comment, unsigned int *rulenum)
{ {
struct ip6t_standard_target *t = (void *)ip6t_get_target(s); struct ip6t_standard_target *t = (void *)ip6t_get_target(s);
...@@ -289,8 +289,8 @@ get_chainname_rulenum(struct ip6t_entry *s, struct ip6t_entry *e, ...@@ -289,8 +289,8 @@ get_chainname_rulenum(struct ip6t_entry *s, struct ip6t_entry *e,
&& unconditional(&s->ipv6)) { && unconditional(&s->ipv6)) {
/* Tail of chains: STANDARD target (return/policy) */ /* Tail of chains: STANDARD target (return/policy) */
*comment = *chainname == hookname *comment = *chainname == hookname
? (char *)comments[NF_IP6_TRACE_COMMENT_POLICY] ? comments[NF_IP6_TRACE_COMMENT_POLICY]
: (char *)comments[NF_IP6_TRACE_COMMENT_RETURN]; : comments[NF_IP6_TRACE_COMMENT_RETURN];
} }
return 1; return 1;
} else } else
...@@ -309,14 +309,14 @@ static void trace_packet(struct sk_buff *skb, ...@@ -309,14 +309,14 @@ static void trace_packet(struct sk_buff *skb,
{ {
void *table_base; void *table_base;
const struct ip6t_entry *root; const struct ip6t_entry *root;
char *hookname, *chainname, *comment; const char *hookname, *chainname, *comment;
unsigned int rulenum = 0; unsigned int rulenum = 0;
table_base = private->entries[smp_processor_id()]; table_base = private->entries[smp_processor_id()];
root = get_entry(table_base, private->hook_entry[hook]); root = get_entry(table_base, private->hook_entry[hook]);
hookname = chainname = (char *)hooknames[hook]; hookname = chainname = hooknames[hook];
comment = (char *)comments[NF_IP6_TRACE_COMMENT_RULE]; comment = comments[NF_IP6_TRACE_COMMENT_RULE];
IP6T_ENTRY_ITERATE(root, IP6T_ENTRY_ITERATE(root,
private->size - private->hook_entry[hook], private->size - private->hook_entry[hook],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment