public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
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.] Weird TTL for ICMP packets
Date: Sun, 30 Oct 2011 16:36:00 +0100	[thread overview]
Message-ID: <20111030153600.GA3234@pandem0nium> (raw)
In-Reply-To: <1850275.SO2QzbpOTm@sven-laptop.home.narfation.org>

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

Hi Sven,

although looking a little bit confusing, this seems to be correct. The TTL
field is used to transport the kernel modules compat version when it differs
from the one used in batctl.

Compare the batctl code (ping.c:284):
               switch (icmp_packet_in.msg_type) {
[...]
               case PARAMETER_PROBLEM:
                        printf("Error - the batman adv kernel module version (%d) differs from ours (%d)\n",
                                        icmp_packet_in.ttl, COMPAT_VERSION);
                        printf("Please make sure to compatible versions!\n");
                        goto out;
[...]

However, I guess an explaining comment in the kernel code would not be wrong ...

Cheers
	Simon


On Sun, Oct 30, 2011 at 02:31:55PM +0100, Sven Eckelmann wrote:
> Hi,
> 
> just looked through some ICMP code in icmp_socket.c and found a little bit 
> weird TTL:
> 
> 218         if (icmp_packet->version != COMPAT_VERSION) {                                                                                      
> 219                 icmp_packet->msg_type = PARAMETER_PROBLEM;                                                                                 
> 220                 icmp_packet->ttl = COMPAT_VERSION;                                                                                         
> 221                 bat_socket_add_packet(socket_client, icmp_packet, 
> packet_len);
> 222                 goto free_skb;                                                                                                             
> 223         }
> 
> It was introduced by dba95eb270ff9674326865a20d25921c69c04d6c. My guess is 
> that TTL should be used.
> 
> Kind regards,
> 	Sven



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

  reply	other threads:[~2011-10-30 15:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-30 13:31 [B.A.T.M.A.N.] Weird TTL for ICMP packets Sven Eckelmann
2011-10-30 15:36 ` Simon Wunderlich [this message]
2011-10-30 15:40 ` [B.A.T.M.A.N.] [PATCH] batman-adv: explain the weird " Simon Wunderlich
2011-10-30 15:57   ` Sven Eckelmann

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=20111030153600.GA3234@pandem0nium \
    --to=simon.wunderlich@s2003.tu-chemnitz.de \
    --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