On Tue, Sep 17, 2013 at 02:08:14PM +0200, Marco Dalla Torre wrote:
- switch (iphdr->ip6_nxt) {
- case IPPROTO_ICMPV6:
LEN_CHECK(
(size_t)buff_len - (size_t)(sizeof(struct ip6_hdr)),
sizeof(struct icmp6_hdr),
"ICMPv6");
icmphdr = (struct icmp6_hdr *)(packet_buff +
sizeof(struct ip6_hdr));
inet_ntop(AF_INET6, &(iphdr->ip6_src), nd_ipv6_addr, 40);
printf("IPv6 %s > ", nd_ipv6_addr);
switch (icmphdr->icmp6_type) {
case ICMP6_DST_UNREACH:
if ((size_t)(buff_len) < IPV6_MIN_MTU) {
fprintf(stderr,
"Warning - dropping received 'ICMPv6 destination unreached' packet as it is bigger than maximum allowed size (%u): %zu\n",
IPV6_MIN_MTU, (size_t)(buff_len));
Is the message wrong? should it be the other way around? "packet is smaller than minimum size" ? And why should _only_ this ICMP packet be bigger of IPV6_MIN_MTU ?
Cheers,