diff options
author | Weongyo Jeong <weongyo.linux@gmail.com> | 2016-03-15 13:57:44 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-03-28 06:56:07 -0400 |
commit | ccd63c20fe834a3f98f46f0447e5f106c4ffa2a4 (patch) | |
tree | e05947f06481cac0534684f041ff134eff76c03b | |
parent | e46b4e2b46e173889b19999b8bd033d5e8b3acf0 (diff) |
netfilter: nf_conntrack: Uses pr_fmt() for logging.
Uses pr_fmt() macro for debugging messages of nf_conntrack module.
Signed-off-by: Weongyo Jeong <weongyo.linux@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index afde5f5e728a..2fd607408998 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -12,6 +12,8 @@ | |||
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
16 | |||
15 | #include <linux/types.h> | 17 | #include <linux/types.h> |
16 | #include <linux/netfilter.h> | 18 | #include <linux/netfilter.h> |
17 | #include <linux/module.h> | 19 | #include <linux/module.h> |
@@ -966,7 +968,7 @@ init_conntrack(struct net *net, struct nf_conn *tmpl, | |||
966 | 968 | ||
967 | if (!l4proto->new(ct, skb, dataoff, timeouts)) { | 969 | if (!l4proto->new(ct, skb, dataoff, timeouts)) { |
968 | nf_conntrack_free(ct); | 970 | nf_conntrack_free(ct); |
969 | pr_debug("init conntrack: can't track with proto module\n"); | 971 | pr_debug("can't track with proto module\n"); |
970 | return NULL; | 972 | return NULL; |
971 | } | 973 | } |
972 | 974 | ||
@@ -988,7 +990,7 @@ init_conntrack(struct net *net, struct nf_conn *tmpl, | |||
988 | spin_lock(&nf_conntrack_expect_lock); | 990 | spin_lock(&nf_conntrack_expect_lock); |
989 | exp = nf_ct_find_expectation(net, zone, tuple); | 991 | exp = nf_ct_find_expectation(net, zone, tuple); |
990 | if (exp) { | 992 | if (exp) { |
991 | pr_debug("conntrack: expectation arrives ct=%p exp=%p\n", | 993 | pr_debug("expectation arrives ct=%p exp=%p\n", |
992 | ct, exp); | 994 | ct, exp); |
993 | /* Welcome, Mr. Bond. We've been expecting you... */ | 995 | /* Welcome, Mr. Bond. We've been expecting you... */ |
994 | __set_bit(IPS_EXPECTED_BIT, &ct->status); | 996 | __set_bit(IPS_EXPECTED_BIT, &ct->status); |
@@ -1053,7 +1055,7 @@ resolve_normal_ct(struct net *net, struct nf_conn *tmpl, | |||
1053 | if (!nf_ct_get_tuple(skb, skb_network_offset(skb), | 1055 | if (!nf_ct_get_tuple(skb, skb_network_offset(skb), |
1054 | dataoff, l3num, protonum, net, &tuple, l3proto, | 1056 | dataoff, l3num, protonum, net, &tuple, l3proto, |
1055 | l4proto)) { | 1057 | l4proto)) { |
1056 | pr_debug("resolve_normal_ct: Can't get tuple\n"); | 1058 | pr_debug("Can't get tuple\n"); |
1057 | return NULL; | 1059 | return NULL; |
1058 | } | 1060 | } |
1059 | 1061 | ||
@@ -1079,14 +1081,13 @@ resolve_normal_ct(struct net *net, struct nf_conn *tmpl, | |||
1079 | } else { | 1081 | } else { |
1080 | /* Once we've had two way comms, always ESTABLISHED. */ | 1082 | /* Once we've had two way comms, always ESTABLISHED. */ |
1081 | if (test_bit(IPS_SEEN_REPLY_BIT, &ct->status)) { | 1083 | if (test_bit(IPS_SEEN_REPLY_BIT, &ct->status)) { |
1082 | pr_debug("nf_conntrack_in: normal packet for %p\n", ct); | 1084 | pr_debug("normal packet for %p\n", ct); |
1083 | *ctinfo = IP_CT_ESTABLISHED; | 1085 | *ctinfo = IP_CT_ESTABLISHED; |
1084 | } else if (test_bit(IPS_EXPECTED_BIT, &ct->status)) { | 1086 | } else if (test_bit(IPS_EXPECTED_BIT, &ct->status)) { |
1085 | pr_debug("nf_conntrack_in: related packet for %p\n", | 1087 | pr_debug("related packet for %p\n", ct); |
1086 | ct); | ||
1087 | *ctinfo = IP_CT_RELATED; | 1088 | *ctinfo = IP_CT_RELATED; |
1088 | } else { | 1089 | } else { |
1089 | pr_debug("nf_conntrack_in: new packet for %p\n", ct); | 1090 | pr_debug("new packet for %p\n", ct); |
1090 | *ctinfo = IP_CT_NEW; | 1091 | *ctinfo = IP_CT_NEW; |
1091 | } | 1092 | } |
1092 | *set_reply = 0; | 1093 | *set_reply = 0; |