]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/netfilter/xt_osf.c
netfilter: xtables: change matches to return error code
[mirror_ubuntu-bionic-kernel.git] / net / netfilter / xt_osf.c
index 4d1a41bbd5d7b735f63c7f0482472b12f9784472..8dcde13a0781439b7458fdc8a3c7eb07146f9054 100644 (file)
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
-
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 #include <linux/module.h>
 #include <linux/kernel.h>
 
@@ -334,7 +334,7 @@ static bool xt_osf_match_packet(const struct sk_buff *skb,
                        if (info->flags & XT_OSF_LOG)
                                nf_log_packet(p->family, p->hooknum, skb,
                                        p->in, p->out, NULL,
-                                       "%s [%s:%s] : %pi4:%d -> %pi4:%d hops=%d\n",
+                                       "%s [%s:%s] : %pI4:%d -> %pI4:%d hops=%d\n",
                                        f->genre, f->version, f->subtype,
                                        &ip->saddr, ntohs(tcp->source),
                                        &ip->daddr, ntohs(tcp->dest),
@@ -349,7 +349,7 @@ static bool xt_osf_match_packet(const struct sk_buff *skb,
 
        if (!fcount && (info->flags & XT_OSF_LOG))
                nf_log_packet(p->family, p->hooknum, skb, p->in, p->out, NULL,
-                       "Remote OS is not known: %pi4:%u -> %pi4:%u\n",
+                       "Remote OS is not known: %pI4:%u -> %pI4:%u\n",
                                &ip->saddr, ntohs(tcp->source),
                                &ip->daddr, ntohs(tcp->dest));
 
@@ -382,14 +382,14 @@ static int __init xt_osf_init(void)
 
        err = nfnetlink_subsys_register(&xt_osf_nfnetlink);
        if (err < 0) {
-               printk(KERN_ERR "Failed (%d) to register OSF nsfnetlink helper.\n", err);
+               pr_err("Failed to register OSF nsfnetlink helper (%d)\n", err);
                goto err_out_exit;
        }
 
        err = xt_register_match(&xt_osf_match);
        if (err) {
-               printk(KERN_ERR "Failed (%d) to register OS fingerprint "
-                               "matching module.\n", err);
+               pr_err("Failed to register OS fingerprint "
+                      "matching module (%d)\n", err);
                goto err_out_remove;
        }