public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@meshcoding.com>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [RFCv2] batctl tcpdump: add IPv6 support to tcpdump parser
Date: Tue, 17 Sep 2013 17:51:20 +0200	[thread overview]
Message-ID: <20130917155120.GD3053@neomailbox.net> (raw)
In-Reply-To: <1379419694-12758-1-git-send-email-marco.dallato@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]

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,

-- 
Antonio Quartulli

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-09-17 15:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 12:08 [B.A.T.M.A.N.] [RFCv2] batctl tcpdump: add IPv6 support to tcpdump parser Marco Dalla Torre
2013-09-17 12:31 ` Antonio Quartulli
2013-09-17 14:01   ` Marco Dalla Torre
2013-09-17 15:38     ` Antonio Quartulli
2013-09-17 15:51 ` Antonio Quartulli [this message]
2013-09-17 16:35   ` Marco Dalla Torre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130917155120.GD3053@neomailbox.net \
    --to=antonio@meshcoding.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox