netfilter: Use nf_hook_state.net
[firefly-linux-kernel-4.4.55.git] / net / ipv6 / netfilter / ip6t_SYNPROXY.c
index ebbb754c2111b73c87fe85aa58b3124e0a3032ef..4c9f3e79d75f1185d5ccec41184fec1b9ae4f83f 100644 (file)
@@ -237,7 +237,7 @@ synproxy_send_client_ack(const struct synproxy_net *snet,
        nth->ack_seq    = th->ack_seq;
        tcp_flag_word(nth) = TCP_FLAG_ACK;
        nth->doff       = tcp_hdr_size / 4;
-       nth->window     = ntohs(htons(th->window) >> opts->wscale);
+       nth->window     = htons(ntohs(th->window) >> opts->wscale);
        nth->check      = 0;
        nth->urg_ptr    = 0;
 
@@ -320,7 +320,7 @@ static unsigned int ipv6_synproxy_hook(const struct nf_hook_ops *ops,
                                       struct sk_buff *skb,
                                       const struct nf_hook_state *nhs)
 {
-       struct synproxy_net *snet = synproxy_pernet(dev_net(nhs->in ? : nhs->out));
+       struct synproxy_net *snet = synproxy_pernet(nhs->net);
        enum ip_conntrack_info ctinfo;
        struct nf_conn *ct;
        struct nf_conn_synproxy *synproxy;