Moritz Warning | 1 Feb 14:15 2015
Picon

batctl: feature to filter nodes/clients

Hi,

I need to display the number of all nodes/clients as well as all neighbor nodes/clients.
This would be easy if batctl would be able to output the respective
list of mac addresses (batctl ... | wc -l).

I've started writing a patch as part of a feature request:
http://www.open-mesh.org/issues/203

But the problem is how to get the respective output form the debug tables.
I have been reading the docs, but have not been able
to understand the necessary information needed, no offense:

http://www.open-mesh.org/projects/batman-adv/wiki/Understand-your-batman-adv-network

Some explanation beforehand:
Clients are computers not running batman-adv,
represented by the MAC address of its network interface.
Nodes are computers running batman-adv,
represented by the MAC address of its primary interface.

List of all nodes:
Get all MACs from the 'Originator' column of the originator table

List of all neighbor nodes:
Get all MACs from the 'Nexthop' column of the originator table
and make it a unique list.

List of all clients:
Get all MACs of the 'Client' column of the transtable_local table
(Continue reading)

Linus Lüssing | 30 Jan 09:14 2015

Re: [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or disabling the multicast querier independently of IGMP snooping

On Tue, Jan 27, 2015 at 11:48:09AM +0100, Gioacchino Mazzurco wrote:
> Reading this mail seems that who installa batman-adv nodes should do this 
> setting manually, doesn't batman-adv know/(can estimate) who is the goode node 
> were to put the querier?
> 

Like Matthias said, the selection process is an "upper layer
thing" (from the batman-adv point of view). The querier with
the lowest IP address will become the selected querier as
specified by the IGMP/MLD RFCs.

> What happen if we have the querier on every node?

To be honest, I'm not 100% sure. For what is implemented so far,
it might actually work out with no downsides. If the node/querier
with the lowest IP happens to be behind a bad, lossy wifi link and
two consecutive IGMP/MLD query messages from this selected querier
get lost then one of the other potential queriers should take over
within a five seconds window.

This should work out well if you have a planned, structured mesh
network with a few dozen nodes where you made sure that each node
is well connected to the rest of the mesh.

If you're having a mesh network with some hundreds of nodes
with potentially many behind bad wifi links, I'd get a little
nervous... it'd be like running your IPv6 network (IPv6 relies on
multicast) on a large, wobbly jelly.

My general suggestion at the moment is, to only have queriers
(Continue reading)

Matthias Schiffer | 27 Jan 12:43 2015
Picon

Re: [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or disabling the multicast querier independently of IGMP snooping

Regarding IGMP/MLD, batman-adv will just provide an overlay ethernet
layer, on which the normal rules of RFC2710 / RFC3376 will be used to
elect the querier: the router with the lowest IP address that has the
querier feature enabled becomes the querier.

Linus Lüssing, who developled the multicast optimization feature for
batman-adv, suggested to only enable IGMP/MLD snooping, but not the
querier, on normal mesh nodes, which is why I wrote this patch.

On 01/27/2015 11:48 AM, Gioacchino Mazzurco wrote:
> Reading this mail seems that who installa batman-adv nodes should do this 
> setting manually, doesn't batman-adv know/(can estimate) who is the goode node 
> were to put the querier?
> 
> What happen if we have the querier on every node?
> 
> Thanks!
> 
> On Tuesday, January 27, 2015 03:49:52 AM Matthias Schiffer wrote:
>> In larger networks, especially big batman-adv meshes, it may be desirable to
>> enable IGMP snooping on every bridge without enabling the multicast querier
>> to specifically put the querier on a well-connected node.
>>
>> This patch adds a new UCI option 'multicast_querier' for bridges which
>> allows this. The default is still the value of the 'igmp_snooping' option
>> to maintain backwards compatiblity.
>>
>> Signed-off-by: Matthias Schiffer <mschiffer@...>
>> ---
>>  bridge.c       | 8 +++++++-
(Continue reading)

Jan Lühr | 25 Jan 14:24 2015
Picon

Understanding MAC-Adresses in iptables-Logs

Hello folks,

there appears to be some misconfiguration in our network. A gateway is
blocking unknown ip-addresses:

[658047.514011] FORWARD DROPPEDIN=bat0 OUT=backbone
MAC=3a:81:5b:64:fa:32:08:fc:88:9b:8a:60:08:00:45:00:00:4f:6c:b1:40:00:3f:06:b8:8e:0a:a6
SRC=10.166.28.69 DST=173.194.65.188 LEN=79 TOS=0x00 PREC=0x00 TTL=63
ID=27825 DF PROTO=TCP SPT=45173 DPT=5228 WINDOW=9131 RES=0x00 ACK PSH
URGP=0
[658047.519455] FORWARD DROPPEDIN=bat0 OUT=backbone
MAC=3a:81:5b:64:fa:32:08:fc:88:9b:8a:60:08:00:45:00:00:34:6c:b2:40:00:3f:06:b8:a8:0a:a6
SRC=10.166.28.69 DST=173.194.65.188 LEN=52 TOS=0x00 PREC=0x00 TTL=63
ID=27826 DF PROTO=TCP SPT=45173 DPT=5228 WINDOW=9131 RES=0x00 ACK FIN
URGP=0

I'm somewhat confused by the mac-address here - it's very long.
Can I somehow derive, which originator or client is propagating or using
this address?

Greetz, Jan

Jan-Philipp Litza | 19 Jan 21:59 2015
Picon

[PATCH] alfred: Tighten size check on received packet

When first checking if a received packet is truncated, the size of the
alfred_tlv structure is ignored, thus allowing packets that are
truncated by 4 bytes or less to pass the check unnoticed.

Even the check itself might access memory after the packet if its size
was only 2 bytes or less.

Signed-off-by: Jan-Philipp Litza <janphilipp@...>
---
 recv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/recv.c b/recv.c
index 90db0b3..870485f 100644
--- a/recv.c
+++ b/recv.c
 <at>  <at>  -402,7 +402,8  <at>  <at>  int recv_alfred_packet(struct globals *globals, struct interface *interface)
 		return -1;

 	/* drop truncated packets */
-	if (length < ((int)ntohs(packet->length)))
+	if (length < (int)sizeof(*packet) ||
+	    length < (int)(ntohs(packet->length) + sizeof(*packet)))
 		return -1;

 	/* drop incompatible packet */
--

-- 
2.1.0

(Continue reading)

Antonio Quartulli | 9 Jan 11:22 2015

[PATCH next] batctl: fix misspelled words

Reported-by: checkpatch
Signed-off-by: Antonio Quartulli <antonio@...>
---
 packet.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packet.h b/packet.h
index facd1fe..b81fbbf 100644
--- a/packet.h
+++ b/packet.h
 <at>  <at>  -377,7 +377,7  <at>  <at>  struct batadv_frag_packet {
 	uint8_t reserved:4;
 	uint8_t no:4;
 #else
-#error "unknown bitfield endianess"
+#error "unknown bitfield endianness"
 #endif
 	uint8_t dest[ETH_ALEN];
 	uint8_t orig[ETH_ALEN];
 <at>  <at>  -453,7 +453,7  <at>  <at>  struct batadv_coded_packet {
  *  <at> src: address of the source
  *  <at> dst: address of the destination
  *  <at> tvlv_len: length of tvlv data following the unicast tvlv header
- *  <at> align: 2 bytes to align the header to a 4 byte boundry
+ *  <at> align: 2 bytes to align the header to a 4 byte boundary
  */
 struct batadv_unicast_tvlv_packet {
 	uint8_t  packet_type;
--

-- 
2.2.1
(Continue reading)

Moritz Warning | 5 Jan 19:46 2015
Picon

get a list of IP addresses to all neighbor nodes

Hi,

I try to display a list of IPv6-Addresses of all neighbors on each node so users
can jump/click from a nodes HTTP status page to another (sounds like fun!).

The basic approach would be to use an IPv6 ULA address (prefix+ some MAC address) for the node
and to somehow get the MAC part from batman.

A list might generate by this:

for mac in $(batctl o -H | grep 'No' -v | cut -b 37-53 | sort | uniq); do
	addr="$(ula_addr $prefix $mac)"
	echo "	<li><h3><a href=\"http://[$addr]\">$mac</a></h3></li>"
done

The problem is now to understand where this MAC comes from. Does it belong to a node or client (we do not want
clients displayed)?
Afaik, the MAC is the address of the interface of the neighbor node, which might be one of several belonging
to that node.
A solution might be to give a node an ULA-address for each interface batman-adv uses.

Is there a nicer solution?

Markus Pargmann | 26 Dec 12:41 2014
Picon

[PATCH v2 00/26] batman-adv: Cleanups

Hi,

this is v2 of this series. I removed the hashtable patches for the moment. The
types.h patch is fixed to include linux headers only when compiling for the
kernel so that it can still be used in batctl.

Major changes (Patch 1-7):
 - Compiling debugfs.c only when CONFIG_DEBUG_FS is selected. This reduces the
   amount of unnecessary code that is executed. At the moment all calls to
   debugfs functions will result in NOOPs. However there is some more code that
   we simply don't need without DEBUG_FS.
 - tvlv is separated from the large main.c file into its own tvlv.c. I don't
   see a reason to have this set of functions for tvlv inside the main.c file.

Minor changes (Patch 8-26):
 - Removing unnecessary return value variables
 - Fixing some comments
 - Reordering functions to increase readability
 - Coding style fixes
 - Declare boolean return types as bool
 - Add missing includes

Best regards,

Markus

Markus Pargmann (26):
  batman-adv: debugfs, avoid compiling for !DEBUG_FS
  batman-adv: Separate logging header
  batman-adv: iv_ogm, Reduce code duplication
(Continue reading)

Melroy van den Berg | 15 Dec 16:12 2014
Picon

Out-of-date batman-adv module in Linux Mint (Ubuntu)

Hi devs,

I found out that the batman-adv kernel modules is quite out-dated in
Linux Mint (and probably also Ubuntu/Debian unstable).

Using 'lsmod batman-adv' it says: version 2013.5.0. But the current
version is 2014.3.0.

Is it on the planning to update to the newest version? Or what could
we / I do to update the package(s)?

Thanks!

Kind regards,
Melroy van den Berg

Linus Lüssing | 13 Dec 23:32 2014

[PATCH maint] batman-adv: fix potential TT client + orig-node memory leak

This patch fixes a potential memory leak which can occur once an
originator times out. On timeout the according global translation table
entry might not get purged correctly. Furthermore, the non purged TT
entry will cause its orig-node to leak, too. Which additionally can lead
to the new multicast optimization feature not kicking in because of a
therefore bogus counter.

In the wild with larger mesh networks we saw this leak quite regularly,
resulting in routers to reboot or killed processes. This was because
of a combination of two bugs: The bug fixed by commit
"batman-adv: fix delayed foreign originator recognition" (8a2ad5204674)
amplified this memory leak heavily. Since that commit I'd expect
it to happen rarely, probably only in paused and resumed VMs and
devices previously in stand-by.

The issue this patch fixes is caused by batadv_orig_node_free_rcu()
never being called because of not yet released references to the
orig-node. References which were supposed to be released through
batadv_orig_node_free_rcu()->batadv_tt_global_del_orig().

Fixing the issue by moving batadv_tt_global_del_orig() out of the rcu
callback.

Signed-off-by: Linus Lüssing <linus.luessing@...>
---
 originator.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/originator.c b/originator.c
index 648bdba..bea8198 100644
(Continue reading)

Marek Lindner | 13 Dec 08:21 2014
Picon

Re: batman-adv: Fix dmesg | grep, use batman_adv (instead of batman-adv)


Hi,

the mail below went to the wrong mailing list (commits <at>  is read-only).

Cheers,
Marek

On Friday 12 December 2014 22:04:10 Melroy van den Berg wrote:
> Hi,
> 
> This is my first patch :). This is small one, but it's a bug.
> 
> From 414638b05aacdfb111c8f4bf0e35d63b65b8ebdf Mon Sep 17 00:00:00 2001
> From: Melroy van den Berg <webmaster1989@...>
> Date: Fri, 12 Dec 2014 21:56:32 +0100
> Subject: [PATCH] batman-adv: Use batman_adv (instead of batman-adv) to grep
> in
>  dmesg, because batman_adv is the real module name.
> 
> Signed-off-by: Melroy van den Berg <webmaster1989@...>
> ---
>  README | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/README b/README
> index 58e4904..4f401e5 100644
> --- a/README
> +++ b/README
>  <at>  <at>  -135,7 +135,7  <at>  <at>  mands: dmesg, logread, or looking in the files
(Continue reading)


Gmane