netfilter: cleanup printk messages
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 13 May 2010 13:02:08 +0000 (15:02 +0200)
committerPatrick McHardy <kaber@trash.net>
Thu, 13 May 2010 13:02:08 +0000 (15:02 +0200)
Make sure all printk messages have a severity level.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
24 files changed:
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/iptable_filter.c
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
net/ipv4/netfilter/nf_nat_h323.c
net/ipv4/netfilter/nf_nat_snmp_basic.c
net/ipv4/netfilter/nf_nat_standalone.c
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6table_filter.c
net/ipv6/netfilter/ip6table_mangle.c
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
net/netfilter/nf_conntrack_amanda.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_ftp.c
net/netfilter/nf_conntrack_h323_main.c
net/netfilter/nf_conntrack_irc.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_proto_sctp.c
net/netfilter/nf_conntrack_sip.c
net/netfilter/nf_conntrack_standalone.c
net/netfilter/nf_conntrack_tftp.c
net/netfilter/nf_internals.h
net/netfilter/nfnetlink.c
net/netfilter/nfnetlink_log.c

index 65f2944b5a6413ab112eefc0e8a4e610fa751388..1ac01b1286219475cde625bb921887fc3645d7a3 100644 (file)
@@ -222,7 +222,7 @@ static unsigned int
 arpt_error(struct sk_buff *skb, const struct xt_action_param *par)
 {
        if (net_ratelimit())
-               printk("arp_tables: error: '%s'\n",
+               pr_err("arp_tables: error: '%s'\n",
                       (const char *)par->targinfo);
 
        return NF_DROP;
@@ -385,7 +385,7 @@ static int mark_source_chains(const struct xt_table_info *newinfo,
                        int visited = e->comefrom & (1 << hook);
 
                        if (e->comefrom & (1 << NF_ARP_NUMHOOKS)) {
-                               printk("arptables: loop hook %u pos %u %08X.\n",
+                               pr_notice("arptables: loop hook %u pos %u %08X.\n",
                                       hook, pos, e->comefrom);
                                return 0;
                        }
index ad702bc34e75e6c43d32484145ec43c15bfafc02..63958f3394a5d0fbe67e675ee72a10b9d27446cd 100644 (file)
@@ -466,7 +466,7 @@ mark_source_chains(const struct xt_table_info *newinfo,
                        int visited = e->comefrom & (1 << hook);
 
                        if (e->comefrom & (1 << NF_INET_NUMHOOKS)) {
-                               printk("iptables: loop hook %u pos %u %08X.\n",
+                               pr_err("iptables: loop hook %u pos %u %08X.\n",
                                       hook, pos, e->comefrom);
                                return 0;
                        }
index 55392466daa49fd455a4c28d6b168c388db2eff2..c37641e819f2e9025854b95edc8de145831cb70a 100644 (file)
@@ -89,7 +89,7 @@ static int __init iptable_filter_init(void)
        int ret;
 
        if (forward < 0 || forward > NF_MAX_VERDICT) {
-               printk("iptables forward must be 0 or 1\n");
+               pr_err("iptables forward must be 0 or 1\n");
                return -EINVAL;
        }
 
index 2bb1f87051c4762b896aa9669969742b04859133..5a03c02af999a45ac7d3f9e403ea1c2d38bc0c5a 100644 (file)
@@ -382,32 +382,32 @@ static int __init nf_conntrack_l3proto_ipv4_init(void)
 
        ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_tcp4);
        if (ret < 0) {
-               printk("nf_conntrack_ipv4: can't register tcp.\n");
+               pr_err("nf_conntrack_ipv4: can't register tcp.\n");
                goto cleanup_sockopt;
        }
 
        ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_udp4);
        if (ret < 0) {
-               printk("nf_conntrack_ipv4: can't register udp.\n");
+               pr_err("nf_conntrack_ipv4: can't register udp.\n");
                goto cleanup_tcp;
        }
 
        ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_icmp);
        if (ret < 0) {
-               printk("nf_conntrack_ipv4: can't register icmp.\n");
+               pr_err("nf_conntrack_ipv4: can't register icmp.\n");
                goto cleanup_udp;
        }
 
        ret = nf_conntrack_l3proto_register(&nf_conntrack_l3proto_ipv4);
        if (ret < 0) {
-               printk("nf_conntrack_ipv4: can't register ipv4\n");
+               pr_err("nf_conntrack_ipv4: can't register ipv4\n");
                goto cleanup_icmp;
        }
 
        ret = nf_register_hooks(ipv4_conntrack_ops,
                                ARRAY_SIZE(ipv4_conntrack_ops));
        if (ret < 0) {
-               printk("nf_conntrack_ipv4: can't register hooks.\n");
+               pr_err("nf_conntrack_ipv4: can't register hooks.\n");
                goto cleanup_ipv4;
        }
 #if defined(CONFIG_PROC_FS) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
index d4c061874f8fcc1b47454332271a81f83f66359e..5045196d853c7878050161ea5e43e1aac26eff83 100644 (file)
@@ -43,7 +43,7 @@ static int set_addr(struct sk_buff *skb,
                                              addroff, sizeof(buf),
                                              (char *) &buf, sizeof(buf))) {
                        if (net_ratelimit())
-                               printk("nf_nat_h323: nf_nat_mangle_tcp_packet"
+                               pr_notice("nf_nat_h323: nf_nat_mangle_tcp_packet"
                                       " error\n");
                        return -1;
                }
@@ -59,7 +59,7 @@ static int set_addr(struct sk_buff *skb,
                                              addroff, sizeof(buf),
                                              (char *) &buf, sizeof(buf))) {
                        if (net_ratelimit())
-                               printk("nf_nat_h323: nf_nat_mangle_udp_packet"
+                               pr_notice("nf_nat_h323: nf_nat_mangle_udp_packet"
                                       " error\n");
                        return -1;
                }
@@ -215,7 +215,7 @@ static int nat_rtp_rtcp(struct sk_buff *skb, struct nf_conn *ct,
        /* Run out of expectations */
        if (i >= H323_RTP_CHANNEL_MAX) {
                if (net_ratelimit())
-                       printk("nf_nat_h323: out of expectations\n");
+                       pr_notice("nf_nat_h323: out of expectations\n");
                return 0;
        }
 
@@ -234,7 +234,7 @@ static int nat_rtp_rtcp(struct sk_buff *skb, struct nf_conn *ct,
 
        if (nated_port == 0) {  /* No port available */
                if (net_ratelimit())
-                       printk("nf_nat_h323: out of RTP ports\n");
+                       pr_notice("nf_nat_h323: out of RTP ports\n");
                return 0;
        }
 
@@ -291,7 +291,7 @@ static int nat_t120(struct sk_buff *skb, struct nf_conn *ct,
 
        if (nated_port == 0) {  /* No port available */
                if (net_ratelimit())
-                       printk("nf_nat_h323: out of TCP ports\n");
+                       pr_notice("nf_nat_h323: out of TCP ports\n");
                return 0;
        }
 
@@ -341,7 +341,7 @@ static int nat_h245(struct sk_buff *skb, struct nf_conn *ct,
 
        if (nated_port == 0) {  /* No port available */
                if (net_ratelimit())
-                       printk("nf_nat_q931: out of TCP ports\n");
+                       pr_notice("nf_nat_q931: out of TCP ports\n");
                return 0;
        }
 
@@ -425,7 +425,7 @@ static int nat_q931(struct sk_buff *skb, struct nf_conn *ct,
 
        if (nated_port == 0) {  /* No port available */
                if (net_ratelimit())
-                       printk("nf_nat_ras: out of TCP ports\n");
+                       pr_notice("nf_nat_ras: out of TCP ports\n");
                return 0;
        }
 
@@ -507,7 +507,7 @@ static int nat_callforwarding(struct sk_buff *skb, struct nf_conn *ct,
 
        if (nated_port == 0) {  /* No port available */
                if (net_ratelimit())
-                       printk("nf_nat_q931: out of TCP ports\n");
+                       pr_notice("nf_nat_q931: out of TCP ports\n");
                return 0;
        }
 
index 4d85b6e55f2978f31cbe2aa85d2fbbf95d9bbdb4..1679e2c0963d9b83e34f1f8d6a34b7702a603e2c 100644 (file)
@@ -401,7 +401,7 @@ static unsigned char asn1_octets_decode(struct asn1_ctx *ctx,
        *octets = kmalloc(eoc - ctx->pointer, GFP_ATOMIC);
        if (*octets == NULL) {
                if (net_ratelimit())
-                       printk("OOM in bsalg (%d)\n", __LINE__);
+                       pr_notice("OOM in bsalg (%d)\n", __LINE__);
                return 0;
        }
 
@@ -452,7 +452,7 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx,
        *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);
        if (*oid == NULL) {
                if (net_ratelimit())
-                       printk("OOM in bsalg (%d)\n", __LINE__);
+                       pr_notice("OOM in bsalg (%d)\n", __LINE__);
                return 0;
        }
 
@@ -729,7 +729,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
                        if (*obj == NULL) {
                                kfree(id);
                                if (net_ratelimit())
-                                       printk("OOM in bsalg (%d)\n", __LINE__);
+                                       pr_notice("OOM in bsalg (%d)\n", __LINE__);
                                return 0;
                        }
                        (*obj)->syntax.l[0] = l;
@@ -746,7 +746,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
                                kfree(p);
                                kfree(id);
                                if (net_ratelimit())
-                                       printk("OOM in bsalg (%d)\n", __LINE__);
+                                       pr_notice("OOM in bsalg (%d)\n", __LINE__);
                                return 0;
                        }
                        memcpy((*obj)->syntax.c, p, len);
@@ -761,7 +761,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
                        if (*obj == NULL) {
                                kfree(id);
                                if (net_ratelimit())
-                                       printk("OOM in bsalg (%d)\n", __LINE__);
+                                       pr_notice("OOM in bsalg (%d)\n", __LINE__);
                                return 0;
                        }
                        if (!asn1_null_decode(ctx, end)) {
@@ -782,7 +782,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
                                kfree(lp);
                                kfree(id);
                                if (net_ratelimit())
-                                       printk("OOM in bsalg (%d)\n", __LINE__);
+                                       pr_notice("OOM in bsalg (%d)\n", __LINE__);
                                return 0;
                        }
                        memcpy((*obj)->syntax.ul, lp, len);
@@ -803,7 +803,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
                                kfree(p);
                                kfree(id);
                                if (net_ratelimit())
-                                       printk("OOM in bsalg (%d)\n", __LINE__);
+                                       pr_notice("OOM in bsalg (%d)\n", __LINE__);
                                return 0;
                        }
                        memcpy((*obj)->syntax.uc, p, len);
@@ -821,7 +821,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
                        if (*obj == NULL) {
                                kfree(id);
                                if (net_ratelimit())
-                                       printk("OOM in bsalg (%d)\n", __LINE__);
+                                       pr_notice("OOM in bsalg (%d)\n", __LINE__);
                                return 0;
                        }
                        (*obj)->syntax.ul[0] = ul;
index 84c7974f5830ea1f9603c872f57de98d95509d89..beb25819c9c9f66c0fa5a1a40c398e860f3e10a8 100644 (file)
@@ -293,12 +293,12 @@ static int __init nf_nat_standalone_init(void)
 #endif
        ret = nf_nat_rule_init();
        if (ret < 0) {
-               printk("nf_nat_init: can't setup rules.\n");
+               pr_err("nf_nat_init: can't setup rules.\n");
                goto cleanup_decode_session;
        }
        ret = nf_register_hooks(nf_nat_ops, ARRAY_SIZE(nf_nat_ops));
        if (ret < 0) {
-               printk("nf_nat_init: can't register hooks.\n");
+               pr_err("nf_nat_init: can't register hooks.\n");
                goto cleanup_rule_init;
        }
        return ret;
index 02a7db025d0f50371a2b059936b1e81be5ddf6d5..6f517bd8369254ae73d0ac9888792326dd610352 100644 (file)
@@ -481,7 +481,7 @@ mark_source_chains(const struct xt_table_info *newinfo,
                        int visited = e->comefrom & (1 << hook);
 
                        if (e->comefrom & (1 << NF_INET_NUMHOOKS)) {
-                               printk("iptables: loop hook %u pos %u %08X.\n",
+                               pr_err("iptables: loop hook %u pos %u %08X.\n",
                                       hook, pos, e->comefrom);
                                return 0;
                        }
index d6fc9aff3163eb417c6aeadffe481e643d55566d..c9e37c8fd62c97ed0e2d3058f177a38b25a79348 100644 (file)
@@ -81,7 +81,7 @@ static int __init ip6table_filter_init(void)
        int ret;
 
        if (forward < 0 || forward > NF_MAX_VERDICT) {
-               printk("iptables forward must be 0 or 1\n");
+               pr_err("iptables forward must be 0 or 1\n");
                return -EINVAL;
        }
 
index 6a102b57f35623c055c1eca22fd80995427ff428..679a0a3b7b3c7c17a4d0cd6ae7c43d34bf5e279f 100644 (file)
@@ -43,7 +43,7 @@ ip6t_mangle_out(struct sk_buff *skb, const struct net_device *out)
        if (skb->len < sizeof(struct iphdr) ||
            ip_hdrlen(skb) < sizeof(struct iphdr)) {
                if (net_ratelimit())
-                       printk("ip6t_hook: happy cracking.\n");
+                       pr_warning("ip6t_hook: happy cracking.\n");
                return NF_ACCEPT;
        }
 #endif
index 996c3f41fecd419223107751b4e2d66764820599..ff43461704be5c9433d7468f1fe99c63aab7d613 100644 (file)
@@ -280,7 +280,7 @@ static unsigned int ipv6_conntrack_local(unsigned int hooknum,
        /* root is playing with raw sockets. */
        if (skb->len < sizeof(struct ipv6hdr)) {
                if (net_ratelimit())
-                       printk("ipv6_conntrack_local: packet too short\n");
+                       pr_notice("ipv6_conntrack_local: packet too short\n");
                return NF_ACCEPT;
        }
        return __ipv6_conntrack_in(dev_net(out), hooknum, skb, okfn);
@@ -406,37 +406,37 @@ static int __init nf_conntrack_l3proto_ipv6_init(void)
 
        ret = nf_ct_frag6_init();
        if (ret < 0) {
-               printk("nf_conntrack_ipv6: can't initialize frag6.\n");
+               pr_err("nf_conntrack_ipv6: can't initialize frag6.\n");
                return ret;
        }
        ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_tcp6);
        if (ret < 0) {
-               printk("nf_conntrack_ipv6: can't register tcp.\n");
+               pr_err("nf_conntrack_ipv6: can't register tcp.\n");
                goto cleanup_frag6;
        }
 
        ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_udp6);
        if (ret < 0) {
-               printk("nf_conntrack_ipv6: can't register udp.\n");
+               pr_err("nf_conntrack_ipv6: can't register udp.\n");
                goto cleanup_tcp;
        }
 
        ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_icmpv6);
        if (ret < 0) {
-               printk("nf_conntrack_ipv6: can't register icmpv6.\n");
+               pr_err("nf_conntrack_ipv6: can't register icmpv6.\n");
                goto cleanup_udp;
        }
 
        ret = nf_conntrack_l3proto_register(&nf_conntrack_l3proto_ipv6);
        if (ret < 0) {
-               printk("nf_conntrack_ipv6: can't register ipv6\n");
+               pr_err("nf_conntrack_ipv6: can't register ipv6\n");
                goto cleanup_icmpv6;
        }
 
        ret = nf_register_hooks(ipv6_conntrack_ops,
                                ARRAY_SIZE(ipv6_conntrack_ops));
        if (ret < 0) {
-               printk("nf_conntrack_ipv6: can't register pre-routing defrag "
+               pr_err("nf_conntrack_ipv6: can't register pre-routing defrag "
                       "hook.\n");
                goto cleanup_ipv6;
        }
index 372e80f07a8160636a9f8530bbd6e05a0ec5664f..13fd2c55e32932b8424520d7b531ee0491eb87b7 100644 (file)
@@ -108,7 +108,7 @@ static int amanda_help(struct sk_buff *skb,
        dataoff = protoff + sizeof(struct udphdr);
        if (dataoff >= skb->len) {
                if (net_ratelimit())
-                       printk("amanda_help: skblen = %u\n", skb->len);
+                       printk(KERN_ERR "amanda_help: skblen = %u\n", skb->len);
                return NF_ACCEPT;
        }
 
index 3907efb97a7c1d92f639cef10476b8534d4b11bf..b83c530c5e0a391c7f09e5ee8950884991377053 100644 (file)
@@ -1335,7 +1335,7 @@ static int nf_conntrack_init_init_net(void)
        }
        nf_conntrack_max = max_factor * nf_conntrack_htable_size;
 
-       printk("nf_conntrack version %s (%u buckets, %d max)\n",
+       printk(KERN_INFO "nf_conntrack version %s (%u buckets, %d max)\n",
               NF_CONNTRACK_VERSION, nf_conntrack_htable_size,
               nf_conntrack_max);
 
index 2ae3169e76330d6565d9f21e8a99f452e07ea8e8..e17cb7c7dd8fda61efabf12d8cefb45c4c8d4a78 100644 (file)
@@ -573,8 +573,8 @@ static int __init nf_conntrack_ftp_init(void)
                                 ftp[i][j].tuple.src.l3num, ports[i]);
                        ret = nf_conntrack_helper_register(&ftp[i][j]);
                        if (ret) {
-                               printk("nf_ct_ftp: failed to register helper "
-                                      " for pf: %d port: %d\n",
+                               printk(KERN_ERR "nf_ct_ftp: failed to register"
+                                      " helper for pf: %d port: %d\n",
                                        ftp[i][j].tuple.src.l3num, ports[i]);
                                nf_conntrack_ftp_fini();
                                return ret;
index 48bf15073a85bd682714e6b7ee3d15bf70d0ce27..6eaee7c8a3375843eb2631ac1d79d155c2d12c1c 100644 (file)
@@ -607,7 +607,7 @@ static int h245_help(struct sk_buff *skb, unsigned int protoff,
       drop:
        spin_unlock_bh(&nf_h323_lock);
        if (net_ratelimit())
-               printk("nf_ct_h245: packet dropped\n");
+               pr_info("nf_ct_h245: packet dropped\n");
        return NF_DROP;
 }
 
@@ -1152,7 +1152,7 @@ static int q931_help(struct sk_buff *skb, unsigned int protoff,
       drop:
        spin_unlock_bh(&nf_h323_lock);
        if (net_ratelimit())
-               printk("nf_ct_q931: packet dropped\n");
+               pr_info("nf_ct_q931: packet dropped\n");
        return NF_DROP;
 }
 
@@ -1727,7 +1727,7 @@ static int ras_help(struct sk_buff *skb, unsigned int protoff,
       drop:
        spin_unlock_bh(&nf_h323_lock);
        if (net_ratelimit())
-               printk("nf_ct_ras: packet dropped\n");
+               pr_info("nf_ct_ras: packet dropped\n");
        return NF_DROP;
 }
 
index 7673930ca3423fadd838d4f17d26aceda27061e7..b394aa318776447d243a2c95ed0aa0c86a754f4d 100644 (file)
@@ -235,7 +235,7 @@ static int __init nf_conntrack_irc_init(void)
        char *tmpname;
 
        if (max_dcc_channels < 1) {
-               printk("nf_ct_irc: max_dcc_channels must not be zero\n");
+               printk(KERN_ERR "nf_ct_irc: max_dcc_channels must not be zero\n");
                return -EINVAL;
        }
 
@@ -267,7 +267,7 @@ static int __init nf_conntrack_irc_init(void)
 
                ret = nf_conntrack_helper_register(&irc[i]);
                if (ret) {
-                       printk("nf_ct_irc: failed to register helper "
+                       printk(KERN_ERR "nf_ct_irc: failed to register helper "
                               "for pf: %u port: %u\n",
                               irc[i].tuple.src.l3num, ports[i]);
                        nf_conntrack_irc_fini();
index 4e55403bf263f5085af3f6a0735437424222aaa0..961fb6a8529456e5500199bd871b007b376510bf 100644 (file)
@@ -2057,29 +2057,29 @@ static int __init ctnetlink_init(void)
 {
        int ret;
 
-       printk("ctnetlink v%s: registering with nfnetlink.\n", version);
+       pr_info("ctnetlink v%s: registering with nfnetlink.\n", version);
        ret = nfnetlink_subsys_register(&ctnl_subsys);
        if (ret < 0) {
-               printk("ctnetlink_init: cannot register with nfnetlink.\n");
+               pr_err("ctnetlink_init: cannot register with nfnetlink.\n");
                goto err_out;
        }
 
        ret = nfnetlink_subsys_register(&ctnl_exp_subsys);
        if (ret < 0) {
-               printk("ctnetlink_init: cannot register exp with nfnetlink.\n");
+               pr_err("ctnetlink_init: cannot register exp with nfnetlink.\n");
                goto err_unreg_subsys;
        }
 
 #ifdef CONFIG_NF_CONNTRACK_EVENTS
        ret = nf_conntrack_register_notifier(&ctnl_notifier);
        if (ret < 0) {
-               printk("ctnetlink_init: cannot register notifier.\n");
+               pr_err("ctnetlink_init: cannot register notifier.\n");
                goto err_unreg_exp_subsys;
        }
 
        ret = nf_ct_expect_register_notifier(&ctnl_notifier_exp);
        if (ret < 0) {
-               printk("ctnetlink_init: cannot expect register notifier.\n");
+               pr_err("ctnetlink_init: cannot expect register notifier.\n");
                goto err_unreg_notifier;
        }
 #endif
@@ -2100,7 +2100,7 @@ err_out:
 
 static void __exit ctnetlink_exit(void)
 {
-       printk("ctnetlink: unregistering from nfnetlink.\n");
+       pr_info("ctnetlink: unregistering from nfnetlink.\n");
 
 #ifdef CONFIG_NF_CONNTRACK_EVENTS
        nf_ct_expect_unregister_notifier(&ctnl_notifier_exp);
index b68ff15ed979b6b3694b7fd74000f9dd6839d900..c6049c2d5ea8d9be54aa6f1d77accafa3b2eb920 100644 (file)
@@ -717,12 +717,12 @@ static int __init nf_conntrack_proto_sctp_init(void)
 
        ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_sctp4);
        if (ret) {
-               printk("nf_conntrack_l4proto_sctp4: protocol register failed\n");
+               pr_err("nf_conntrack_l4proto_sctp4: protocol register failed\n");
                goto out;
        }
        ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_sctp6);
        if (ret) {
-               printk("nf_conntrack_l4proto_sctp6: protocol register failed\n");
+               pr_err("nf_conntrack_l4proto_sctp6: protocol register failed\n");
                goto cleanup_sctp4;
        }
 
index c6cd1b84eddd4e2f8a48f892282384dbc6515de0..b20f4275893c8a61b68304c17c44e379e2be9a65 100644 (file)
@@ -1549,8 +1549,8 @@ static int __init nf_conntrack_sip_init(void)
 
                        ret = nf_conntrack_helper_register(&sip[i][j]);
                        if (ret) {
-                               printk("nf_ct_sip: failed to register helper "
-                                      "for pf: %u port: %u\n",
+                               printk(KERN_ERR "nf_ct_sip: failed to register"
+                                      " helper for pf: %u port: %u\n",
                                       sip[i][j].tuple.src.l3num, ports[i]);
                                nf_conntrack_sip_fini();
                                return ret;
index ea4a8d3842340c9010a76e30c33bf34c9f0975c8..eb973fcd67ab4273a3cdee566a5f4a4fb44a24f2 100644 (file)
@@ -446,7 +446,7 @@ out_kmemdup:
        if (net_eq(net, &init_net))
                unregister_sysctl_table(nf_ct_netfilter_header);
 out:
-       printk("nf_conntrack: can't register to sysctl.\n");
+       printk(KERN_ERR "nf_conntrack: can't register to sysctl.\n");
        return -ENOMEM;
 }
 
index 46e646b2e9b922ff1210ff06c835f32538f0d0c7..75466fd72f4f4af4c0f948a57d06f664db503b48 100644 (file)
@@ -138,8 +138,8 @@ static int __init nf_conntrack_tftp_init(void)
 
                        ret = nf_conntrack_helper_register(&tftp[i][j]);
                        if (ret) {
-                               printk("nf_ct_tftp: failed to register helper "
-                                      "for pf: %u port: %u\n",
+                               printk(KERN_ERR "nf_ct_tftp: failed to register"
+                                      " helper for pf: %u port: %u\n",
                                        tftp[i][j].tuple.src.l3num, ports[i]);
                                nf_conntrack_tftp_fini();
                                return ret;
index bf6609978af7ae3a1f961fe170684909b7453d2b..770f76432ad02b89904646d80ed7c03571bccc16 100644 (file)
@@ -6,7 +6,7 @@
 #include <linux/netdevice.h>
 
 #ifdef CONFIG_NETFILTER_DEBUG
-#define NFDEBUG(format, args...)  printk(format , ## args)
+#define NFDEBUG(format, args...)  printk(KERN_DEBUG format , ## args)
 #else
 #define NFDEBUG(format, args...)
 #endif
index 39b0e31005752482a9081815ceeb58f6dd0dd484..b4a4532823e84ed8fb93fd0e9deceb8cdc07ec96 100644 (file)
@@ -212,13 +212,13 @@ static struct pernet_operations nfnetlink_net_ops = {
 
 static int __init nfnetlink_init(void)
 {
-       printk("Netfilter messages via NETLINK v%s.\n", nfversion);
+       pr_info("Netfilter messages via NETLINK v%s.\n", nfversion);
        return register_pernet_subsys(&nfnetlink_net_ops);
 }
 
 static void __exit nfnetlink_exit(void)
 {
-       printk("Removing netfilter NETLINK layer.\n");
+       pr_info("Removing netfilter NETLINK layer.\n");
        unregister_pernet_subsys(&nfnetlink_net_ops);
 }
 module_init(nfnetlink_init);
index 203643fb2c524ade67aedd22bc5f3ee8221ee884..fc9a211e629e499bbc15eed8f593157a284cc1b7 100644 (file)
@@ -297,7 +297,7 @@ nfulnl_alloc_skb(unsigned int inst_size, unsigned int pkt_size)
        n = max(inst_size, pkt_size);
        skb = alloc_skb(n, GFP_ATOMIC);
        if (!skb) {
-               PRINTR("nfnetlink_log: can't alloc whole buffer (%u bytes)\n",
+               pr_notice("nfnetlink_log: can't alloc whole buffer (%u bytes)\n",
                        inst_size);
 
                if (n > pkt_size) {
@@ -306,7 +306,7 @@ nfulnl_alloc_skb(unsigned int inst_size, unsigned int pkt_size)
 
                        skb = alloc_skb(pkt_size, GFP_ATOMIC);
                        if (!skb)
-                               PRINTR("nfnetlink_log: can't even alloc %u "
+                               pr_err("nfnetlink_log: can't even alloc %u "
                                       "bytes\n", pkt_size);
                }
        }