mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
[NET]: Make NETDEBUG pure printk wrappers
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
64cf1e5d8b
commit
64ce207306
21 changed files with 75 additions and 89 deletions
|
@ -332,8 +332,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
|
|||
* for now we don't know that.
|
||||
*/
|
||||
if ((addr_type == IPV6_ADDR_ANY) || (addr_type & IPV6_ADDR_MULTICAST)) {
|
||||
LIMIT_NETDEBUG(
|
||||
printk(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n"));
|
||||
LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -341,8 +340,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
|
|||
* Never answer to a ICMP packet.
|
||||
*/
|
||||
if (is_ineligible(skb)) {
|
||||
LIMIT_NETDEBUG(
|
||||
printk(KERN_DEBUG "icmpv6_send: no reply to icmp error\n"));
|
||||
LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: no reply to icmp error\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -393,8 +391,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
|
|||
len = skb->len - msg.offset;
|
||||
len = min_t(unsigned int, len, IPV6_MIN_MTU - sizeof(struct ipv6hdr) -sizeof(struct icmp6hdr));
|
||||
if (len < 0) {
|
||||
LIMIT_NETDEBUG(
|
||||
printk(KERN_DEBUG "icmp: len problem\n"));
|
||||
LIMIT_NETDEBUG(KERN_DEBUG "icmp: len problem\n");
|
||||
goto out_dst_release;
|
||||
}
|
||||
|
||||
|
@ -584,17 +581,15 @@ static int icmpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
|
|||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
if (csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_ICMPV6,
|
||||
skb->csum)) {
|
||||
LIMIT_NETDEBUG(
|
||||
printk(KERN_DEBUG "ICMPv6 hw checksum failed\n"));
|
||||
LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 hw checksum failed\n");
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
}
|
||||
}
|
||||
if (skb->ip_summed == CHECKSUM_NONE) {
|
||||
if (csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_ICMPV6,
|
||||
skb_checksum(skb, 0, skb->len, 0))) {
|
||||
LIMIT_NETDEBUG(
|
||||
printk(KERN_DEBUG "ICMPv6 checksum failed [%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x > %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]\n",
|
||||
NIP6(*saddr), NIP6(*daddr)));
|
||||
LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x > %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]\n",
|
||||
NIP6(*saddr), NIP6(*daddr));
|
||||
goto discard_it;
|
||||
}
|
||||
}
|
||||
|
@ -670,8 +665,7 @@ static int icmpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
|
|||
break;
|
||||
|
||||
default:
|
||||
LIMIT_NETDEBUG(
|
||||
printk(KERN_DEBUG "icmpv6: msg of unknown type\n"));
|
||||
LIMIT_NETDEBUG(KERN_DEBUG "icmpv6: msg of unknown type\n");
|
||||
|
||||
/* informational */
|
||||
if (type & ICMPV6_INFOMSG_MASK)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue