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