netfilter: cleanup printk messages
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>
This commit is contained in:
committed by
Patrick McHardy
parent
af5676039a
commit
654d0fbdc8
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user