aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_sane.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/netfilter/nf_conntrack_sane.c b/net/netfilter/nf_conntrack_sane.c
index b5a16c6e21c2..a70051d741a7 100644
--- a/net/netfilter/nf_conntrack_sane.c
+++ b/net/netfilter/nf_conntrack_sane.c
@@ -62,8 +62,9 @@ static int help(struct sk_buff *skb,
62 enum ip_conntrack_info ctinfo) 62 enum ip_conntrack_info ctinfo)
63{ 63{
64 unsigned int dataoff, datalen; 64 unsigned int dataoff, datalen;
65 struct tcphdr _tcph, *th; 65 const struct tcphdr *th;
66 char *sb_ptr; 66 struct tcphdr _tcph;
67 void *sb_ptr;
67 int ret = NF_ACCEPT; 68 int ret = NF_ACCEPT;
68 int dir = CTINFO2DIR(ctinfo); 69 int dir = CTINFO2DIR(ctinfo);
69 struct nf_ct_sane_master *ct_sane_info; 70 struct nf_ct_sane_master *ct_sane_info;
@@ -99,7 +100,7 @@ static int help(struct sk_buff *skb,
99 if (datalen != sizeof(struct sane_request)) 100 if (datalen != sizeof(struct sane_request))
100 goto out; 101 goto out;
101 102
102 req = (struct sane_request *)sb_ptr; 103 req = sb_ptr;
103 if (req->RPC_code != htonl(SANE_NET_START)) { 104 if (req->RPC_code != htonl(SANE_NET_START)) {
104 /* Not an interesting command */ 105 /* Not an interesting command */
105 ct_sane_info->state = SANE_STATE_NORMAL; 106 ct_sane_info->state = SANE_STATE_NORMAL;
@@ -123,7 +124,7 @@ static int help(struct sk_buff *skb,
123 goto out; 124 goto out;
124 } 125 }
125 126
126 reply = (struct sane_reply_net_start *)sb_ptr; 127 reply = sb_ptr;
127 if (reply->status != htonl(SANE_STATUS_SUCCESS)) { 128 if (reply->status != htonl(SANE_STATUS_SUCCESS)) {
128 /* saned refused the command */ 129 /* saned refused the command */
129 pr_debug("nf_ct_sane: unsuccessful SANE_STATUS = %u\n", 130 pr_debug("nf_ct_sane: unsuccessful SANE_STATUS = %u\n",