Commit afd46503 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

net: ipv4: Standardize prefixes for message logging

Add #define pr_fmt(fmt) as appropriate.

Add "IPv4: ", "TCP: ", and "IPsec: " to appropriate files.
Standardize on "UDPLite: " for appropriate uses.
Some prefixes were previously "UDPLITE: " and "UDP-Lite: ".

Add KBUILD_MODNAME ": " to icmp and gre.
Remove embedded prefixes as appropriate.

Add missing "\n" to pr_info in gre.c.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 058bd4d2
...@@ -40,7 +40,7 @@ static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh) ...@@ -40,7 +40,7 @@ static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh)
* checksum. UDP-Lite (like IPv6) mandates checksums, hence packets * checksum. UDP-Lite (like IPv6) mandates checksums, hence packets
* with a zero checksum field are illegal. */ * with a zero checksum field are illegal. */
if (uh->check == 0) { if (uh->check == 0) {
LIMIT_NETDEBUG(KERN_DEBUG "UDPLITE: zeroed checksum field\n"); LIMIT_NETDEBUG(KERN_DEBUG "UDPLite: zeroed checksum field\n");
return 1; return 1;
} }
...@@ -52,7 +52,7 @@ static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh) ...@@ -52,7 +52,7 @@ static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh)
/* /*
* Coverage length violates RFC 3828: log and discard silently. * Coverage length violates RFC 3828: log and discard silently.
*/ */
LIMIT_NETDEBUG(KERN_DEBUG "UDPLITE: bad csum coverage %d/%d\n", LIMIT_NETDEBUG(KERN_DEBUG "UDPLite: bad csum coverage %d/%d\n",
cscov, skb->len); cscov, skb->len);
return 1; return 1;
......
...@@ -65,6 +65,8 @@ ...@@ -65,6 +65,8 @@
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#define pr_fmt(fmt) "IPv4: " fmt
#include <linux/err.h> #include <linux/err.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/types.h> #include <linux/types.h>
......
#define pr_fmt(fmt) "IPsec: " fmt
#include <crypto/hash.h> #include <crypto/hash.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -445,9 +447,10 @@ static int ah_init_state(struct xfrm_state *x) ...@@ -445,9 +447,10 @@ static int ah_init_state(struct xfrm_state *x)
if (aalg_desc->uinfo.auth.icv_fullbits/8 != if (aalg_desc->uinfo.auth.icv_fullbits/8 !=
crypto_ahash_digestsize(ahash)) { crypto_ahash_digestsize(ahash)) {
pr_info("AH: %s digestsize %u != %hu\n", pr_info("%s: %s digestsize %u != %hu\n",
x->aalg->alg_name, crypto_ahash_digestsize(ahash), __func__, x->aalg->alg_name,
aalg_desc->uinfo.auth.icv_fullbits/8); crypto_ahash_digestsize(ahash),
aalg_desc->uinfo.auth.icv_fullbits / 8);
goto error; goto error;
} }
......
#define pr_fmt(fmt) "IPsec: " fmt
#include <crypto/aead.h> #include <crypto/aead.h>
#include <crypto/authenc.h> #include <crypto/authenc.h>
#include <linux/err.h> #include <linux/err.h>
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
* *
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/kmod.h> #include <linux/kmod.h>
...@@ -118,10 +120,10 @@ static const struct net_protocol net_gre_protocol = { ...@@ -118,10 +120,10 @@ static const struct net_protocol net_gre_protocol = {
static int __init gre_init(void) static int __init gre_init(void)
{ {
pr_info("GRE over IPv4 demultiplexor driver"); pr_info("GRE over IPv4 demultiplexor driver\n");
if (inet_add_protocol(&net_gre_protocol, IPPROTO_GRE) < 0) { if (inet_add_protocol(&net_gre_protocol, IPPROTO_GRE) < 0) {
pr_err("gre: can't add protocol\n"); pr_err("can't add protocol\n");
return -EAGAIN; return -EAGAIN;
} }
......
...@@ -62,6 +62,8 @@ ...@@ -62,6 +62,8 @@
* *
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
...@@ -670,7 +672,7 @@ static void icmp_unreach(struct sk_buff *skb) ...@@ -670,7 +672,7 @@ static void icmp_unreach(struct sk_buff *skb)
break; break;
case ICMP_FRAG_NEEDED: case ICMP_FRAG_NEEDED:
if (ipv4_config.no_pmtu_disc) { if (ipv4_config.no_pmtu_disc) {
LIMIT_NETDEBUG(KERN_INFO "ICMP: %pI4: fragmentation needed and DF set\n", LIMIT_NETDEBUG(KERN_INFO pr_fmt("%pI4: fragmentation needed and DF set\n"),
&iph->daddr); &iph->daddr);
} else { } else {
info = ip_rt_frag_needed(net, iph, info = ip_rt_frag_needed(net, iph,
...@@ -681,7 +683,7 @@ static void icmp_unreach(struct sk_buff *skb) ...@@ -681,7 +683,7 @@ static void icmp_unreach(struct sk_buff *skb)
} }
break; break;
case ICMP_SR_FAILED: case ICMP_SR_FAILED:
LIMIT_NETDEBUG(KERN_INFO "ICMP: %pI4: Source Route Failed\n", LIMIT_NETDEBUG(KERN_INFO pr_fmt("%pI4: Source Route Failed\n"),
&iph->daddr); &iph->daddr);
break; break;
default: default:
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
* Patrick McHardy : LRU queue of frag heads for evictor. * Patrick McHardy : LRU queue of frag heads for evictor.
*/ */
#define pr_fmt(fmt) "IPv4: " fmt
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -299,7 +301,7 @@ static inline struct ipq *ip_find(struct net *net, struct iphdr *iph, u32 user) ...@@ -299,7 +301,7 @@ static inline struct ipq *ip_find(struct net *net, struct iphdr *iph, u32 user)
return container_of(q, struct ipq, q); return container_of(q, struct ipq, q);
out_nomem: out_nomem:
LIMIT_NETDEBUG(KERN_ERR "ip_frag_create: no memory left !\n"); LIMIT_NETDEBUG(KERN_ERR pr_fmt("ip_frag_create: no memory left !\n"));
return NULL; return NULL;
} }
...@@ -637,8 +639,8 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev, ...@@ -637,8 +639,8 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev,
return 0; return 0;
out_nomem: out_nomem:
LIMIT_NETDEBUG(KERN_ERR "IP: queue_glue: no memory for gluing " LIMIT_NETDEBUG(KERN_ERR pr_fmt("queue_glue: no memory for gluing queue %p\n"),
"queue %p\n", qp); qp);
err = -ENOMEM; err = -ENOMEM;
goto out_fail; goto out_fail;
out_oversize: out_oversize:
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
* *
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/capability.h> #include <linux/capability.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
......
...@@ -113,6 +113,8 @@ ...@@ -113,6 +113,8 @@
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#define pr_fmt(fmt) "IPv4: " fmt
#include <asm/system.h> #include <asm/system.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
* *
*/ */
#define pr_fmt(fmt) "IPv4: " fmt
#include <linux/capability.h> #include <linux/capability.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
......
...@@ -62,6 +62,8 @@ ...@@ -62,6 +62,8 @@
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#define pr_fmt(fmt) "IPv4: " fmt
#include <linux/module.h> #include <linux/module.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -1298,7 +1300,7 @@ static struct rtable *rt_intern_hash(unsigned hash, struct rtable *rt, ...@@ -1298,7 +1300,7 @@ static struct rtable *rt_intern_hash(unsigned hash, struct rtable *rt,
} }
if (net_ratelimit()) if (net_ratelimit())
pr_warn("ipv4: Neighbour table overflow\n"); pr_warn("Neighbour table overflow\n");
rt_drop(rt); rt_drop(rt);
return ERR_PTR(-ENOBUFS); return ERR_PTR(-ENOBUFS);
} }
......
...@@ -245,6 +245,8 @@ ...@@ -245,6 +245,8 @@
* TCP_CLOSE socket is finished * TCP_CLOSE socket is finished
*/ */
#define pr_fmt(fmt) "TCP: " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -1675,7 +1677,8 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -1675,7 +1677,8 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
if (tp->ucopy.dma_cookie < 0) { if (tp->ucopy.dma_cookie < 0) {
pr_alert("dma_cookie < 0\n"); pr_alert("%s: dma_cookie < 0\n",
__func__);
/* Exception. Bailout! */ /* Exception. Bailout! */
if (!copied) if (!copied)
...@@ -1884,9 +1887,9 @@ bool tcp_check_oom(struct sock *sk, int shift) ...@@ -1884,9 +1887,9 @@ bool tcp_check_oom(struct sock *sk, int shift)
out_of_socket_memory = tcp_out_of_memory(sk); out_of_socket_memory = tcp_out_of_memory(sk);
if (too_many_orphans && net_ratelimit()) if (too_many_orphans && net_ratelimit())
pr_info("TCP: too many orphaned sockets\n"); pr_info("too many orphaned sockets\n");
if (out_of_socket_memory && net_ratelimit()) if (out_of_socket_memory && net_ratelimit())
pr_info("TCP: out of memory -- consider tuning tcp_mem\n"); pr_info("out of memory -- consider tuning tcp_mem\n");
return too_many_orphans || out_of_socket_memory; return too_many_orphans || out_of_socket_memory;
} }
...@@ -3311,7 +3314,7 @@ void __init tcp_init(void) ...@@ -3311,7 +3314,7 @@ void __init tcp_init(void)
sysctl_tcp_rmem[1] = 87380; sysctl_tcp_rmem[1] = 87380;
sysctl_tcp_rmem[2] = max(87380, max_share); sysctl_tcp_rmem[2] = max(87380, max_share);
pr_info("TCP: Hash tables configured (established %u bind %u)\n", pr_info("Hash tables configured (established %u bind %u)\n",
tcp_hashinfo.ehash_mask + 1, tcp_hashinfo.bhash_size); tcp_hashinfo.ehash_mask + 1, tcp_hashinfo.bhash_size);
tcp_register_congestion_control(&tcp_reno); tcp_register_congestion_control(&tcp_reno);
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
* Copyright (C) 2005 Stephen Hemminger <shemminger@osdl.org> * Copyright (C) 2005 Stephen Hemminger <shemminger@osdl.org>
*/ */
#define pr_fmt(fmt) "TCP: " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -41,17 +43,17 @@ int tcp_register_congestion_control(struct tcp_congestion_ops *ca) ...@@ -41,17 +43,17 @@ int tcp_register_congestion_control(struct tcp_congestion_ops *ca)
/* all algorithms must implement ssthresh and cong_avoid ops */ /* all algorithms must implement ssthresh and cong_avoid ops */
if (!ca->ssthresh || !ca->cong_avoid) { if (!ca->ssthresh || !ca->cong_avoid) {
pr_err("TCP %s does not implement required ops\n", ca->name); pr_err("%s does not implement required ops\n", ca->name);
return -EINVAL; return -EINVAL;
} }
spin_lock(&tcp_cong_list_lock); spin_lock(&tcp_cong_list_lock);
if (tcp_ca_find(ca->name)) { if (tcp_ca_find(ca->name)) {
pr_notice("TCP %s already registered\n", ca->name); pr_notice("%s already registered\n", ca->name);
ret = -EEXIST; ret = -EEXIST;
} else { } else {
list_add_tail_rcu(&ca->list, &tcp_cong_list); list_add_tail_rcu(&ca->list, &tcp_cong_list);
pr_info("TCP %s registered\n", ca->name); pr_info("%s registered\n", ca->name);
} }
spin_unlock(&tcp_cong_list_lock); spin_unlock(&tcp_cong_list_lock);
......
...@@ -61,6 +61,8 @@ ...@@ -61,6 +61,8 @@
* Pasi Sarolahti: F-RTO for dealing with spurious RTOs * Pasi Sarolahti: F-RTO for dealing with spurious RTOs
*/ */
#define pr_fmt(fmt) "TCP: " fmt
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/module.h> #include <linux/module.h>
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
* a single port at the same time. * a single port at the same time.
*/ */
#define pr_fmt(fmt) "TCP: " fmt
#include <linux/bottom_half.h> #include <linux/bottom_half.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -876,8 +877,7 @@ int tcp_syn_flood_action(struct sock *sk, ...@@ -876,8 +877,7 @@ int tcp_syn_flood_action(struct sock *sk,
lopt = inet_csk(sk)->icsk_accept_queue.listen_opt; lopt = inet_csk(sk)->icsk_accept_queue.listen_opt;
if (!lopt->synflood_warned) { if (!lopt->synflood_warned) {
lopt->synflood_warned = 1; lopt->synflood_warned = 1;
pr_info("%s: Possible SYN flooding on port %d. %s. " pr_info("%s: Possible SYN flooding on port %d. %s. Check SNMP counters.\n",
" Check SNMP counters.\n",
proto, ntohs(tcp_hdr(skb)->dest), msg); proto, ntohs(tcp_hdr(skb)->dest), msg);
} }
return want_cookie; return want_cookie;
...@@ -1399,7 +1399,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) ...@@ -1399,7 +1399,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
* to destinations, already remembered * to destinations, already remembered
* to the moment of synflood. * to the moment of synflood.
*/ */
LIMIT_NETDEBUG(KERN_DEBUG "TCP: drop open request from %pI4/%u\n", LIMIT_NETDEBUG(KERN_DEBUG pr_fmt("drop open request from %pI4/%u\n"),
&saddr, ntohs(tcp_hdr(skb)->source)); &saddr, ntohs(tcp_hdr(skb)->source));
goto drop_and_release; goto drop_and_release;
} }
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/kprobes.h> #include <linux/kprobes.h>
#include <linux/socket.h> #include <linux/socket.h>
...@@ -239,7 +241,7 @@ static __init int tcpprobe_init(void) ...@@ -239,7 +241,7 @@ static __init int tcpprobe_init(void)
if (ret) if (ret)
goto err1; goto err1;
pr_info("TCP probe registered (port=%d) bufsize=%u\n", port, bufsize); pr_info("probe registered (port=%d) bufsize=%u\n", port, bufsize);
return 0; return 0;
err1: err1:
proc_net_remove(&init_net, procname); proc_net_remove(&init_net, procname);
......
...@@ -333,16 +333,18 @@ void tcp_retransmit_timer(struct sock *sk) ...@@ -333,16 +333,18 @@ void tcp_retransmit_timer(struct sock *sk)
*/ */
struct inet_sock *inet = inet_sk(sk); struct inet_sock *inet = inet_sk(sk);
if (sk->sk_family == AF_INET) { if (sk->sk_family == AF_INET) {
LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI4:%u/%u unexpectedly shrunk window %u:%u (repaired)\n", LIMIT_NETDEBUG(KERN_DEBUG pr_fmt("Peer %pI4:%u/%u unexpectedly shrunk window %u:%u (repaired)\n"),
&inet->inet_daddr, ntohs(inet->inet_dport), &inet->inet_daddr,
inet->inet_num, tp->snd_una, tp->snd_nxt); ntohs(inet->inet_dport), inet->inet_num,
tp->snd_una, tp->snd_nxt);
} }
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
else if (sk->sk_family == AF_INET6) { else if (sk->sk_family == AF_INET6) {
struct ipv6_pinfo *np = inet6_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk);
LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI6:%u/%u unexpectedly shrunk window %u:%u (repaired)\n", LIMIT_NETDEBUG(KERN_DEBUG pr_fmt("Peer %pI6:%u/%u unexpectedly shrunk window %u:%u (repaired)\n"),
&np->daddr, ntohs(inet->inet_dport), &np->daddr,
inet->inet_num, tp->snd_una, tp->snd_nxt); ntohs(inet->inet_dport), inet->inet_num,
tp->snd_una, tp->snd_nxt);
} }
#endif #endif
if (tcp_time_stamp - tp->rcv_tstamp > TCP_RTO_MAX) { if (tcp_time_stamp - tp->rcv_tstamp > TCP_RTO_MAX) {
......
...@@ -77,6 +77,8 @@ ...@@ -77,6 +77,8 @@
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#define pr_fmt(fmt) "UDP: " fmt
#include <asm/system.h> #include <asm/system.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/ioctls.h> #include <asm/ioctls.h>
...@@ -975,7 +977,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -975,7 +977,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
/* ... which is an evident application bug. --ANK */ /* ... which is an evident application bug. --ANK */
release_sock(sk); release_sock(sk);
LIMIT_NETDEBUG(KERN_DEBUG "udp cork app bug 2\n"); LIMIT_NETDEBUG(KERN_DEBUG pr_fmt("cork app bug 2\n"));
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} }
...@@ -1054,7 +1056,7 @@ int udp_sendpage(struct sock *sk, struct page *page, int offset, ...@@ -1054,7 +1056,7 @@ int udp_sendpage(struct sock *sk, struct page *page, int offset,
if (unlikely(!up->pending)) { if (unlikely(!up->pending)) {
release_sock(sk); release_sock(sk);
LIMIT_NETDEBUG(KERN_DEBUG "udp cork app bug 3\n"); LIMIT_NETDEBUG(KERN_DEBUG pr_fmt("udp cork app bug 3\n"));
return -EINVAL; return -EINVAL;
} }
...@@ -1447,8 +1449,7 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) ...@@ -1447,8 +1449,7 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
* provided by the application." * provided by the application."
*/ */
if (up->pcrlen == 0) { /* full coverage was set */ if (up->pcrlen == 0) { /* full coverage was set */
LIMIT_NETDEBUG(KERN_WARNING "UDPLITE: partial coverage " LIMIT_NETDEBUG(KERN_WARNING "UDPLite: partial coverage %d while full coverage %d requested\n",
"%d while full coverage %d requested\n",
UDP_SKB_CB(skb)->cscov, skb->len); UDP_SKB_CB(skb)->cscov, skb->len);
goto drop; goto drop;
} }
...@@ -1459,8 +1460,7 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) ...@@ -1459,8 +1460,7 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
* Therefore the above ...()->partial_cov statement is essential. * Therefore the above ...()->partial_cov statement is essential.
*/ */
if (UDP_SKB_CB(skb)->cscov < up->pcrlen) { if (UDP_SKB_CB(skb)->cscov < up->pcrlen) {
LIMIT_NETDEBUG(KERN_WARNING LIMIT_NETDEBUG(KERN_WARNING "UDPLite: coverage %d too small, need min %d\n",
"UDPLITE: coverage %d too small, need min %d\n",
UDP_SKB_CB(skb)->cscov, up->pcrlen); UDP_SKB_CB(skb)->cscov, up->pcrlen);
goto drop; goto drop;
} }
...@@ -1689,13 +1689,10 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, ...@@ -1689,13 +1689,10 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
short_packet: short_packet:
LIMIT_NETDEBUG(KERN_DEBUG "UDP%s: short packet: From %pI4:%u %d/%d to %pI4:%u\n", LIMIT_NETDEBUG(KERN_DEBUG "UDP%s: short packet: From %pI4:%u %d/%d to %pI4:%u\n",
proto == IPPROTO_UDPLITE ? "-Lite" : "", proto == IPPROTO_UDPLITE ? "Lite" : "",
&saddr, &saddr, ntohs(uh->source),
ntohs(uh->source), ulen, skb->len,
ulen, &daddr, ntohs(uh->dest));
skb->len,
&daddr,
ntohs(uh->dest));
goto drop; goto drop;
csum_error: csum_error:
...@@ -1704,11 +1701,8 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, ...@@ -1704,11 +1701,8 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
* the network is concerned, anyway) as per 4.1.3.4 (MUST). * the network is concerned, anyway) as per 4.1.3.4 (MUST).
*/ */
LIMIT_NETDEBUG(KERN_DEBUG "UDP%s: bad checksum. From %pI4:%u to %pI4:%u ulen %d\n", LIMIT_NETDEBUG(KERN_DEBUG "UDP%s: bad checksum. From %pI4:%u to %pI4:%u ulen %d\n",
proto == IPPROTO_UDPLITE ? "-Lite" : "", proto == IPPROTO_UDPLITE ? "Lite" : "",
&saddr, &saddr, ntohs(uh->source), &daddr, ntohs(uh->dest),
ntohs(uh->source),
&daddr,
ntohs(uh->dest),
ulen); ulen);
drop: drop:
UDP_INC_STATS_BH(net, UDP_MIB_INERRORS, proto == IPPROTO_UDPLITE); UDP_INC_STATS_BH(net, UDP_MIB_INERRORS, proto == IPPROTO_UDPLITE);
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#define pr_fmt(fmt) "UDPLite: " fmt
#include <linux/export.h> #include <linux/export.h>
#include "udp_impl.h" #include "udp_impl.h"
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
* Copyright (C) 2003 David S. Miller (davem@redhat.com) * Copyright (C) 2003 David S. Miller (davem@redhat.com)
*/ */
#define pr_fmt(fmt) "IPsec: " fmt
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/mutex.h> #include <linux/mutex.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment