OSDN Git Service

netfilter: x_tables: move hook state into xt_action_param structure
[android-x86/kernel.git] / net / netfilter / xt_osf.c
index 2455b69..c05fefc 100644 (file)
@@ -201,7 +201,7 @@ xt_osf_match_packet(const struct sk_buff *skb, struct xt_action_param *p)
        unsigned char opts[MAX_IPOPTLEN];
        const struct xt_osf_finger *kf;
        const struct xt_osf_user_finger *f;
-       struct net *net = p->net;
+       struct net *net = xt_net(p);
 
        if (!info)
                return false;
@@ -326,8 +326,8 @@ xt_osf_match_packet(const struct sk_buff *skb, struct xt_action_param *p)
                fcount++;
 
                if (info->flags & XT_OSF_LOG)
-                       nf_log_packet(net, p->family, p->hooknum, skb,
-                                     p->in, p->out, NULL,
+                       nf_log_packet(net, xt_family(p), xt_hooknum(p), skb,
+                                     xt_in(p), xt_out(p), NULL,
                                      "%s [%s:%s] : %pI4:%d -> %pI4:%d hops=%d\n",
                                      f->genre, f->version, f->subtype,
                                      &ip->saddr, ntohs(tcp->source),
@@ -341,8 +341,8 @@ xt_osf_match_packet(const struct sk_buff *skb, struct xt_action_param *p)
        rcu_read_unlock();
 
        if (!fcount && (info->flags & XT_OSF_LOG))
-               nf_log_packet(net, p->family, p->hooknum, skb, p->in,
-                             p->out, NULL,
+               nf_log_packet(net, xt_family(p), xt_hooknum(p), skb, xt_in(p),
+                             xt_out(p), NULL,
                        "Remote OS is not known: %pI4:%u -> %pI4:%u\n",
                                &ip->saddr, ntohs(tcp->source),
                                &ip->daddr, ntohs(tcp->dest));