]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/netfilter/xt_osf.c
Merge branch 'for-2.6.33' of git://linux-nfs.org/~bfields/linux
[mv-sheeva.git] / net / netfilter / xt_osf.c
index 863e40977a4db6d0b37fcc670137032afec85839..4d1a41bbd5d7b735f63c7f0482472b12f9784472 100644 (file)
@@ -70,7 +70,8 @@ static void xt_osf_finger_free_rcu(struct rcu_head *rcu_head)
 }
 
 static int xt_osf_add_callback(struct sock *ctnl, struct sk_buff *skb,
-                       struct nlmsghdr *nlh, struct nlattr *osf_attrs[])
+                              const struct nlmsghdr *nlh,
+                              const struct nlattr * const osf_attrs[])
 {
        struct xt_osf_user_finger *f;
        struct xt_osf_finger *kf = NULL, *sf;
@@ -112,11 +113,12 @@ static int xt_osf_add_callback(struct sock *ctnl, struct sk_buff *skb,
 }
 
 static int xt_osf_remove_callback(struct sock *ctnl, struct sk_buff *skb,
-                       struct nlmsghdr *nlh, struct nlattr *osf_attrs[])
+                                 const struct nlmsghdr *nlh,
+                                 const struct nlattr * const osf_attrs[])
 {
        struct xt_osf_user_finger *f;
        struct xt_osf_finger *sf;
-       int err = ENOENT;
+       int err = -ENOENT;
 
        if (!osf_attrs[OSF_ATTR_FINGER])
                return -EINVAL;
@@ -330,7 +332,8 @@ static bool xt_osf_match_packet(const struct sk_buff *skb,
                        fcount++;
 
                        if (info->flags & XT_OSF_LOG)
-                               nf_log_packet(p->hooknum, 0, skb, p->in, p->out, NULL,
+                               nf_log_packet(p->family, p->hooknum, skb,
+                                       p->in, p->out, NULL,
                                        "%s [%s:%s] : %pi4:%d -> %pi4:%d hops=%d\n",
                                        f->genre, f->version, f->subtype,
                                        &ip->saddr, ntohs(tcp->source),
@@ -345,7 +348,7 @@ static bool xt_osf_match_packet(const struct sk_buff *skb,
        rcu_read_unlock();
 
        if (!fcount && (info->flags & XT_OSF_LOG))
-               nf_log_packet(p->hooknum, 0, skb, p->in, p->out, NULL,
+               nf_log_packet(p->family, p->hooknum, skb, p->in, p->out, NULL,
                        "Remote OS is not known: %pi4:%u -> %pi4:%u\n",
                                &ip->saddr, ntohs(tcp->source),
                                &ip->daddr, ntohs(tcp->dest));