diff options
Diffstat (limited to 'net/ipv6/icmp.c')
| -rw-r--r-- | net/ipv6/icmp.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index ff3ec9822e36..5176fc655ea9 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | #include <asm/uaccess.h> | 67 | #include <asm/uaccess.h> |
| 68 | #include <asm/system.h> | 68 | #include <asm/system.h> |
| 69 | 69 | ||
| 70 | DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); | 70 | DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics) __read_mostly; |
| 71 | 71 | ||
| 72 | /* | 72 | /* |
| 73 | * The ICMP socket(s). This is the most convenient way to flow control | 73 | * The ICMP socket(s). This is the most convenient way to flow control |
| @@ -332,8 +332,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
| 332 | * for now we don't know that. | 332 | * for now we don't know that. |
| 333 | */ | 333 | */ |
| 334 | if ((addr_type == IPV6_ADDR_ANY) || (addr_type & IPV6_ADDR_MULTICAST)) { | 334 | if ((addr_type == IPV6_ADDR_ANY) || (addr_type & IPV6_ADDR_MULTICAST)) { |
| 335 | LIMIT_NETDEBUG( | 335 | LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n"); |
| 336 | printk(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n")); | ||
| 337 | return; | 336 | return; |
| 338 | } | 337 | } |
| 339 | 338 | ||
| @@ -341,8 +340,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
| 341 | * Never answer to a ICMP packet. | 340 | * Never answer to a ICMP packet. |
| 342 | */ | 341 | */ |
| 343 | if (is_ineligible(skb)) { | 342 | if (is_ineligible(skb)) { |
| 344 | LIMIT_NETDEBUG( | 343 | LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: no reply to icmp error\n"); |
| 345 | printk(KERN_DEBUG "icmpv6_send: no reply to icmp error\n")); | ||
| 346 | return; | 344 | return; |
| 347 | } | 345 | } |
| 348 | 346 | ||
| @@ -393,8 +391,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
| 393 | len = skb->len - msg.offset; | 391 | len = skb->len - msg.offset; |
| 394 | len = min_t(unsigned int, len, IPV6_MIN_MTU - sizeof(struct ipv6hdr) -sizeof(struct icmp6hdr)); | 392 | len = min_t(unsigned int, len, IPV6_MIN_MTU - sizeof(struct ipv6hdr) -sizeof(struct icmp6hdr)); |
| 395 | if (len < 0) { | 393 | if (len < 0) { |
| 396 | LIMIT_NETDEBUG( | 394 | LIMIT_NETDEBUG(KERN_DEBUG "icmp: len problem\n"); |
| 397 | printk(KERN_DEBUG "icmp: len problem\n")); | ||
| 398 | goto out_dst_release; | 395 | goto out_dst_release; |
| 399 | } | 396 | } |
| 400 | 397 | ||
| @@ -551,7 +548,8 @@ static void icmpv6_notify(struct sk_buff *skb, int type, int code, u32 info) | |||
| 551 | 548 | ||
| 552 | read_lock(&raw_v6_lock); | 549 | read_lock(&raw_v6_lock); |
| 553 | if ((sk = sk_head(&raw_v6_htable[hash])) != NULL) { | 550 | if ((sk = sk_head(&raw_v6_htable[hash])) != NULL) { |
| 554 | while((sk = __raw_v6_lookup(sk, nexthdr, daddr, saddr))) { | 551 | while((sk = __raw_v6_lookup(sk, nexthdr, daddr, saddr, |
| 552 | skb->dev->ifindex))) { | ||
| 555 | rawv6_err(sk, skb, NULL, type, code, inner_offset, info); | 553 | rawv6_err(sk, skb, NULL, type, code, inner_offset, info); |
| 556 | sk = sk_next(sk); | 554 | sk = sk_next(sk); |
| 557 | } | 555 | } |
| @@ -583,17 +581,15 @@ static int icmpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp) | |||
| 583 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 581 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
| 584 | if (csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_ICMPV6, | 582 | if (csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_ICMPV6, |
| 585 | skb->csum)) { | 583 | skb->csum)) { |
| 586 | LIMIT_NETDEBUG( | 584 | LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 hw checksum failed\n"); |
| 587 | printk(KERN_DEBUG "ICMPv6 hw checksum failed\n")); | ||
| 588 | skb->ip_summed = CHECKSUM_NONE; | 585 | skb->ip_summed = CHECKSUM_NONE; |
| 589 | } | 586 | } |
| 590 | } | 587 | } |
| 591 | if (skb->ip_summed == CHECKSUM_NONE) { | 588 | if (skb->ip_summed == CHECKSUM_NONE) { |
| 592 | if (csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_ICMPV6, | 589 | if (csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_ICMPV6, |
| 593 | skb_checksum(skb, 0, skb->len, 0))) { | 590 | skb_checksum(skb, 0, skb->len, 0))) { |
| 594 | LIMIT_NETDEBUG( | 591 | LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x > %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]\n", |
| 595 | printk(KERN_DEBUG "ICMPv6 checksum failed [%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x > %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]\n", | 592 | NIP6(*saddr), NIP6(*daddr)); |
| 596 | NIP6(*saddr), NIP6(*daddr))); | ||
| 597 | goto discard_it; | 593 | goto discard_it; |
| 598 | } | 594 | } |
| 599 | } | 595 | } |
| @@ -669,8 +665,7 @@ static int icmpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp) | |||
| 669 | break; | 665 | break; |
| 670 | 666 | ||
| 671 | default: | 667 | default: |
| 672 | LIMIT_NETDEBUG( | 668 | LIMIT_NETDEBUG(KERN_DEBUG "icmpv6: msg of unknown type\n"); |
| 673 | printk(KERN_DEBUG "icmpv6: msg of unknown type\n")); | ||
| 674 | 669 | ||
| 675 | /* informational */ | 670 | /* informational */ |
| 676 | if (type & ICMPV6_INFOMSG_MASK) | 671 | if (type & ICMPV6_INFOMSG_MASK) |
