Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix skbuff rcsum on packet reroute

2018-03-19 Thread Matthias Schiffer
On 03/19/2018 02:14 PM, Sven Eckelmann wrote: > On Montag, 19. März 2018 14:02:43 CET Matthias Schiffer wrote: >> Using skb_postpull_rcsum here is incorrect: As the name indicates, it is >> supposed to be used after pulling, and will thus subtract the checksum of >> the head

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix skbuff rcsum on packet reroute

2018-03-19 Thread Matthias Schiffer
and thus any change to them also requires a change in the receive > checksum. > > Reported-by: Matthias Schiffer <mschif...@universe-factory.net> > Fixes: cea194d90b11 ("batman-adv: improved client announcement mechanism") > Signed-off-by: Sven Eckelmann <s...@narfat

Re: [B.A.T.M.A.N.] [PATCH maint 3/3] batman-adv: do not modify batadv packet header before pulling it

2018-03-18 Thread Matthias Schiffer
On 03/18/2018 09:15 AM, Sven Eckelmann wrote: > On Freitag, 16. März 2018 11:29:11 CET Matthias Schiffer wrote: >> batadv_check_unicast_ttvn() may modify the batadv header, leading to >> checksum errors in the following processing of the packet. >> >> Rather than fix

Re: [B.A.T.M.A.N.] [PATCH maint 2/3] batman-adv: fix header size check in batadv_dbg_arp()

2018-03-16 Thread Matthias Schiffer
On 03/16/2018 12:31 PM, Sven Eckelmann wrote: > On Freitag, 16. März 2018 11:29:10 CET Matthias Schiffer wrote: >> Checking for 0 is insufficient: when an SKB without a batadv header, but >> with a VLAN header is received, hdr_size will be 4, making the following >> code i

[B.A.T.M.A.N.] [PATCH maint 1/3] batman-adv: update data pointers after skb_cow()

2018-03-16 Thread Matthias Schiffer
batadv_check_unicast_ttvn() calls skb_cow(), so pointers into the SKB data must be (re)set after calling it. The ethhdr variable is dropped altogether. Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> --- net/batman-adv/routing.c | 10 +- 1 file changed, 5 inse

[B.A.T.M.A.N.] [PATCH maint 2/3] batman-adv: fix header size check in batadv_dbg_arp()

2018-03-16 Thread Matthias Schiffer
Checking for 0 is insufficient: when an SKB without a batadv header, but with a VLAN header is received, hdr_size will be 4, making the following code interpret the Ethernet header as a batadv header. Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> --- net/batm

[B.A.T.M.A.N.] [PATCH RFC] batman-adv: always assume 2-byte packet alignment

2018-01-24 Thread Matthias Schiffer
till makes sense to avoid these accesses to prevent log noise when examining other unaligned accesses in the kernel while batman-adv is active. Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> --- include/uapi/linux/batadv_packet.h | 13 ++--- 1 file changed, 2 i

[B.A.T.M.A.N.] [PATCH maint v2 2/2] batman-adv: invalidate checksum on fragment reassembly

2018-01-23 Thread Matthias Schiffer
v. I could reproduce this issue by stacking batman-adv on top of a VXLAN interface. Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> --- net/batman-adv/fragmentation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/batman-adv/fragmentation.c

[B.A.T.M.A.N.] [PATCH maint v2 1/2] batman-adv: fix packet checksum in receive path

2018-01-23 Thread Matthias Schiffer
batman-adv with CHECKSUM_COMPLETE (I assume NICs bail out of checksumming when they see batadv's ethtype?), which is why the log messages do nor occur on every system using batman-adv. I could reproduce this issue by stacking batman-adv on top of a VXLAN interface. Signed-off-by: Matthias Schiffer <mschi

Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: fix packet checksum in receive path

2018-01-23 Thread Matthias Schiffer
On 01/22/2018 10:18 PM, Matthias Schiffer wrote: > On 01/22/2018 09:52 PM, Sven Eckelmann wrote: >> On Montag, 22. Januar 2018 20:24:50 CET Matthias Schiffer wrote: >>> skb_postpull_rcsum() is necessary after eth_type_trans() to adjust the >>> skb checksum, otherwise log

Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: fix packet checksum in receive path

2018-01-22 Thread Matthias Schiffer
On 01/22/2018 09:52 PM, Sven Eckelmann wrote: > On Montag, 22. Januar 2018 20:24:50 CET Matthias Schiffer wrote: >> skb_postpull_rcsum() is necessary after eth_type_trans() to adjust the >> skb checksum, otherwise log spam of the form "bat0: hw csum failure" wi

[B.A.T.M.A.N.] [PATCH maint] batman-adv: fix packet checksum in receive path

2018-01-22 Thread Matthias Schiffer
Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> --- I don't know what the exact circumstances are that trigger the log spam, but it seems this was broken forever (I could also reproduce the issue with our compat-14 legacy branch)... so please ask David to queue this up for stable :)

Re: [B.A.T.M.A.N.] [PATCH 8/9] batman-adv: Change batman_adv.h license to MIT

2017-11-20 Thread Matthias Schiffer
d ask for Acked-by from following persons > > Cc: Simon Wunderlich <s...@simonwunderlich.de> > Cc: Matthias Schiffer <mschif...@universe-factory.net> > Cc: Antonio Quartulli <a...@unstable.cc> > Cc: Andrew Lunn <and...@lunn.ch> > Acked-by: Matthias Schi

Re: [B.A.T.M.A.N.] [PATCH maint 2/3] batman-adv: Keep fragments equally sized

2017-03-04 Thread Matthias Schiffer
On 03/04/2017 04:33 PM, Sven Eckelmann wrote: > The batman-adv fragmentation packets have the design problem that they > cannot be refragmented and cannot handle padding by the underlying link. > The latter often leads to problems when networks are incorrectly configured > and don't use a common

Re: [B.A.T.M.A.N.] [RFC] batman-adv: Switch netlink uapi header copyright to ISC

2016-07-04 Thread Matthias Schiffer
the license of the program which uses this header is not affected. > > Signed-off-by: Sven Eckelmann <s...@narfation.org> > Cc: Matthias Schiffer <mschif...@universe-factory.net> Acked-by: Matthias Schiffer <mschif...@universe-factory.net> > --- > include/uapi/linux/bat

Re: [B.A.T.M.A.N.] Alfred 2016.1 bind errors

2016-05-07 Thread Matthias Schiffer
On 05/06/2016 10:45 PM, Jonathan Haws wrote: > I am trying to get familiar with the Alfred tools and downloaded version > 2016.1. Unfortunately it didn't work - I couldn't get past a bind error: > > root@sierra1:~# ./alfred -m -i bat0 > can't bind: Cannot assign requested address > Failed to

Re: [B.A.T.M.A.N.] [RFC v2 0/5] batman-adv netlink query API

2016-04-20 Thread Matthias Schiffer
On 04/20/2016 09:39 AM, Sven Eckelmann wrote: > On Wednesday 20 April 2016 09:32:19 Matthias Schiffer wrote: > [...] >> As I've mentioned before, regarding the batctl support, I'd love to see a >> little library ("libbatadv"?) on top of libnl that could be used by

Re: [B.A.T.M.A.N.] [RFC v2 0/5] batman-adv netlink query API

2016-04-20 Thread Matthias Schiffer
On 04/18/2016 04:50 PM, Simon Wunderlich wrote: > On Thursday 17 March 2016 17:45:30 Matthias Schiffer wrote: >> Hi, >> this is the second take of my netlink API patches. As mentioned before, the >> netlink API is superior to the current debugfs API in many aspects: >>

Re: [B.A.T.M.A.N.] [RFC 2/2] batman-adv: Don't re-broadcast packets on non-wifi devices

2016-03-31 Thread Matthias Schiffer
On 03/30/2016 02:19 PM, Sven Eckelmann wrote: > It is not necessary to re-broadcast a received broadcast packet on the > rx-device when it is a standard ethernet device. The link medium already > takes care of transporting it to all participants in the broadcast domain. > > The re-broadcast on

[B.A.T.M.A.N.] [RFC v2 2/5] batman-adv: netlink: add translation table query

2016-03-20 Thread Matthias Schiffer
This adds the commands BATADV_CMD_GET_TRANSTABLE_LOCAL and BATADV_CMD_GET_TRANSTABLE_GLOBAL, which correspond to the transtable_local and transtable_global debugfs files. The batadv_tt_client_flags enum is moved to the UAPI to expose it as part of the netlink API. Signed-off-by: Matthias

[B.A.T.M.A.N.] [RFC v2 5/5] batman-adv: add B.A.T.M.A.N. V bat_{orig, neigh}_dump implementations

2016-03-19 Thread Matthias Schiffer
Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> --- include/uapi/linux/batman_adv.h | 1 + net/batman-adv/bat_v.c | 250 2 files changed, 251 insertions(+) diff --git a/include/uapi/linux/batman_adv.h b/include/uapi

[B.A.T.M.A.N.] [RFC v2 4/5] batman-adv: add B.A.T.M.A.N. IV bat_{orig, neigh}_dump implementations

2016-03-19 Thread Matthias Schiffer
Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> --- include/uapi/linux/batman_adv.h | 2 + net/batman-adv/bat_iv_ogm.c | 268 2 files changed, 270 insertions(+) diff --git a/include/uapi/linux/batman_adv.h b/include/uapi

Re: [B.A.T.M.A.N.] [RFC v2 0/5] batman-adv netlink query API

2016-03-19 Thread Matthias Schiffer
On 03/17/2016 05:45 PM, Matthias Schiffer wrote: > Hi, > this is the second take of my netlink API patches. As mentioned before, the > netlink API is superior to the current debugfs API in many aspects: > > * debugfs is broken (see PATCH 1 for details) > * Netlink is namesp

[B.A.T.M.A.N.] [RFC v2 3/5] batman-adv: netlink: add originator and neighbor table queries

2016-03-19 Thread Matthias Schiffer
Add BATADV_CMD_GET_ORIGINATORS and BATADV_CMD_GET_NEIGHBORS commands, using handlers bat_orig_dump and bat_neigh_dump in batadv_algo_ops. Will always return -EOPNOTSUPP for now, as no implementations exist yet. Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> --- includ

[B.A.T.M.A.N.] [RFC v2 1/5] batman-adv: add generic netlink query API to replace debugfs files

2016-03-19 Thread Matthias Schiffer
a batman-adv softif (name, index and MAC address for both the softif and the primary hardif; routing algorithm; batman-adv version) * BATADV_CMD_GET_HARDIFS: will return the list of hardifs (including index, name and MAC address) of all hardifs for a given softif Signed-off-by: Matthias Schiffer

[B.A.T.M.A.N.] [RFC v2 0/5] batman-adv netlink query API

2016-03-19 Thread Matthias Schiffer
* nc_nodes Obviously, documentation is also a TODO. Comments about the API design are very welcome... Regards, Matthias Matthias Schiffer (5): batman-adv: add generic netlink query API to replace debugfs files batman-adv: netlink: add translation table query batman-adv: netlink: add

Re: [B.A.T.M.A.N.] [RFC v2 0/5] batman-adv netlink query API

2016-03-19 Thread Matthias Schiffer
On 03/18/2016 12:23 PM, Sven Eckelmann wrote: > On Thursday 17 March 2016 17:45:30 Matthias Schiffer wrote: > [...] >> At the moment, the following debugfs files have corresponding netlink APIs: >> >> * routing_algos >> * neighbors >> * originators >>

Re: [B.A.T.M.A.N.] [RFC v2 0/5] batman-adv netlink query API

2016-03-19 Thread Matthias Schiffer
On 03/18/2016 08:09 AM, Sven Eckelmann wrote: > On Thursday 17 March 2016 18:04:56 Matthias Schiffer wrote: >> And here is the new version of the PoC userspace tool. >> Build with: >> >> gcc -o batnl batnl.c $$(pkg-config --cflags --libs libnl-1) -Wall > > Thank

Re: [B.A.T.M.A.N.] [PATCHv2 4/4] batman-adv: debugfs: Add netns support

2016-03-14 Thread Matthias Schiffer
On 03/13/2016 10:12 AM, Sven Eckelmann wrote: > On Monday 07 March 2016 15:21:07 Matthias Schiffer wrote: > [...] >> By the way, the netns support is another good reason to switch from the >> debugfs interfaces to a netlink-based interface (as the netlink interface >>

Re: [B.A.T.M.A.N.] [PATCHv2 4/4] batman-adv: debugfs: Add netns support

2016-03-07 Thread Matthias Schiffer
On 03/01/2016 10:19 PM, Andrew Lunn wrote: > Unlike sysfs, debugfs is not netns aware. So batman has to take care > to avoid namespace clashes. > > Each namespace is given a directory within debugfs/batman-adv/netns, > using the namespaces inum as the directory name. > > Files for namespaces

Re: [B.A.T.M.A.N.] batctl: page allocation failure

2016-02-28 Thread Matthias Schiffer
killer" (the second commit's log message is a bit misleading, I guess the author meant "avoid" instead of "allow") Regards, Matthias > > Matthias Schiffer has been working on a solution: > > https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2015-June/0

Re: [B.A.T.M.A.N.] Kernel crashes when using more than one interface in bat0

2015-08-20 Thread Matthias Schiffer
On 08/20/2015 12:08 PM, Hans-Werner Hilse wrote: Hi, Am 2015-08-18 18:35, schrieb Bjoern Franke: Thanks for the hint, it did not work on the debian machines, but I got the systems running with crashkernel enabled. Now we got the first crash: https://p.rrbone.net/paste/nnNHrIJI#oHfBMOs2

Re: [B.A.T.M.A.N.] [RFC] batman-adv: add generic netlink query API to replace debugfs files

2015-08-07 Thread Matthias Schiffer
On 08/07/2015 06:16 PM, Linus Lüssing wrote: Hi Matthias, here at the Wireless BattleMesh we finally had the chance to get some initial discussions on your patch going. For the start a few comprehension questions came up: On Wed, Jun 24, 2015 at 08:34:28PM +0200, Matthias Schiffer wrote

[B.A.T.M.A.N.] [RFC] batman-adv: add generic netlink query API to replace debugfs files

2015-06-24 Thread Matthias Schiffer
@@ +/* Copyright (C) 2015 B.A.T.M.A.N. contributors: + * + * Matthias Schiffer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program

Re: [B.A.T.M.A.N.] [RFC] batman-adv: add generic netlink query API to replace debugfs files

2015-06-24 Thread Matthias Schiffer
This is the mentioned userspace tool. Build with: cc -o batnl batnl.c $(pkg-config --cflags --libs libnl-1) -Wall It uses the outdated libnl-1 instead of the current libnl-3 API to be compatible with OpenWrt's libnl-tiny. It is only a quick-and-dirty example for the usage of the GENL API, so it

Re: [B.A.T.M.A.N.] [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or disabling the multicast querier independently of IGMP snooping

2015-01-27 Thread Matthias Schiffer
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

Re: [B.A.T.M.A.N.] alfred: IPC issues

2014-08-07 Thread Matthias Schiffer
On 08/07/2014 02:34 PM, Jan Lühr wrote: Hello, Am 08/07/2014 10:37 AM, schrieb Simon Wunderlich: Hello Jan, Hei folks, I'm using alfred 2014.0.0 on OpenWRT Barrier Breaker. I'm not able to reproduce this issue using 2014.3.0. I'm not certain, whether 2014.3.0 is the cause.

[B.A.T.M.A.N.] [PATCH] batadv-vis: don't leak socket fd in get_if_mac()

2014-01-19 Thread Matthias Schiffer
Leaking an fd every time get_if_mac() is called causes a batadv-vis server process to hit the open file limit in a matter of hours when it is as low as 1024 (which it is on OpenWRT). Reported-by: Jan-Philipp Litza janphil...@litza.de Signed-off-by: Matthias Schiffer mschif...@universe-factory.net

Re: [B.A.T.M.A.N.] [PATCH] batadv-vis: don't leak socket fd in get_if_mac()

2014-01-19 Thread Matthias Schiffer
On 01/19/2014 05:16 PM, Antonio Quartulli wrote: On 19/01/14 16:01, Matthias Schiffer wrote: Leaking an fd every time get_if_mac() is called causes a batadv-vis server process to hit the open file limit in a matter of hours when it is as low as 1024 (which it is on OpenWRT). Reported-by: Jan

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: add compat code for kstrtou32

2013-11-21 Thread Matthias Schiffer
On 11/21/2013 03:20 PM, Antonio Quartulli wrote: On Thu, Nov 21, 2013 at 02:57:50PM +0100, Matthias Schiffer wrote: On 11/21/2013 08:21 AM, Antonio Quartulli wrote: On Thu, Nov 21, 2013 at 04:45:14AM +0100, Matthias Schiffer wrote: You are casting a u32 * to unsigned long *? Won't this break

Re: [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: set network coding packet handlers in batadv_recv_handler_init()

2013-09-27 Thread Matthias Schiffer
On 09/27/2013 08:07 AM, Marek Lindner wrote: On Thursday 26 September 2013 10:29:49 Matthias Schiffer wrote: batman-adv saves its table of packet handlers as a global state, so handlers must be set up only once (and setting them up a second time will fail). The recently-added network coding

[B.A.T.M.A.N.] [PATCHv3 maint] batman-adv: set up network coding packet handlers during module init

2013-09-27 Thread Matthias Schiffer
. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- v3: moved things around as Marek suggested main.c | 5 +++-- network-coding.c | 28 ++-- network-coding.h | 14 ++ 3 files changed, 31 insertions(+), 16 deletions(-) diff --git

[B.A.T.M.A.N.] [PATCH maint] batman-adv: set network coding packet handlers in batadv_recv_handler_init()

2013-09-26 Thread Matthias Schiffer
-by: Matthias Schiffer mschif...@universe-factory.net --- main.c | 2 ++ network-coding.c | 12 ++-- network-coding.h | 8 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/main.c b/main.c index 08125f3..87ef89a 100644 --- a/main.c +++ b/main.c @@ -349,6 +349,8

[B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: set network coding packet handlers in batadv_recv_handler_init()

2013-09-26 Thread Matthias Schiffer
softif is used (and in consequence, the softif creation fails). Fix this by moving the handler setup to batadv_recv_handler_init(), which is called by batman-adv's __init function (and where most other packet handlers are set up). Signed-off-by: Matthias Schiffer mschif...@universe-factory.net

[B.A.T.M.A.N.] [PATCH maint] batman-adv: wait for rtnl in batadv_store_mesh_iface instead of failing if it is taken

2013-05-28 Thread Matthias Schiffer
setup scripts unreliable. As recently the sysfs removal was postponed to a worker not running with the rtnl taken, the deadlock can't occur any more and it is safe to change the trylock back to a lock to make the sysfs store reliable again. Signed-off-by: Matthias Schiffer mschif...@universe

[B.A.T.M.A.N.] [PATCHv2] batman-adv: fix compat for Debian Wheezy kernel v3.2.39

2013-03-16 Thread Matthias Schiffer
of the eth_hw_addr_random() function with a #define macro. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- v2: fix commit message compat.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compat.h b/compat.h index e1c6cd2..46baf6c 100644 --- a/compat.h

[B.A.T.M.A.N.] [PATCHv3] batman-adv: fix compat for Debian Wheezy kernel v3.2.39

2013-03-16 Thread Matthias Schiffer
of the eth_hw_addr_random() function to resolve the name conflict and adding a #define macro. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- compat.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compat.h b/compat.h index e1c6cd2..d955166 100644

[B.A.T.M.A.N.] [PATCH] Fix compat for for Debian Wheezy kernel v3.2.39

2013-03-15 Thread Matthias Schiffer
of the eth_hw_addr_random() function with a #define macro. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- compat.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compat.h b/compat.h index e1c6cd2..46baf6c 100644 --- a/compat.h +++ b/compat.h @@ -174,10

[B.A.T.M.A.N.] [PATCHv2] batman-adv: send each broadcast only once on non-wireless interfaces

2013-03-09 Thread Matthias Schiffer
, therefore it is better to reduce the number of broadcast packets sent on non-wireless links to one. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- hard-interface.c | 11 +++ main.h | 5 + send.c | 5 - types.h | 1 + 4 files changed, 21

[B.A.T.M.A.N.] [PATCHv3] batman-adv: send each broadcast only once on non-wireless interfaces

2013-03-09 Thread Matthias Schiffer
, therefore it is better to reduce the number of broadcast packets sent on non-wireless links to one. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- v3: fixed typo in commit message hard-interface.c | 11 +++ main.h | 5 + send.c | 5 - types.h

[B.A.T.M.A.N.] [PATCHv4 1/2] batman-adv: split batadv_is_wifi_iface() into two functions

2013-03-09 Thread Matthias Schiffer
Previously batadv_is_wifi_iface() did two things at once: looking up a net_device from an interface index, and determining if it is a wifi device. The second part is useful itself when the caller already has a net_device reference. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net

[B.A.T.M.A.N.] [PATCHv4 2/2] batman-adv: send each broadcast only once on non-wireless interfaces

2013-03-09 Thread Matthias Schiffer
, therefore it is better to reduce the number of broadcast packets sent on non-wireless links to one. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- hard-interface.c | 5 + main.h | 5 + send.c | 5 - types.h | 1 + 4 files changed, 15

[B.A.T.M.A.N.] [PATCHv5 1/2] batman-adv: split batadv_is_wifi_iface() into two functions

2013-03-09 Thread Matthias Schiffer
Previously batadv_is_wifi_iface() did two things at once: looking up a net_device from an interface index, and determining if it is a wifi device. The second part is useful itself when the caller already has a net_device reference. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net

[B.A.T.M.A.N.] [PATCHv5 2/2] batman-adv: send each broadcast only once on non-wireless interfaces

2013-03-09 Thread Matthias Schiffer
, therefore it is better to reduce the number of broadcast packets sent on non-wireless links to one. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- hard-interface.c | 4 main.h | 5 + send.c | 5 - types.h | 1 + 4 files changed, 14 insertions

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: make number of broadcasts configurable per hardif

2013-03-08 Thread Matthias Schiffer
On 03/08/2013 08:28 PM, Marek Lindner wrote: On Saturday, March 09, 2013 01:38:56 Linus Lüssing wrote: From: Matthias Schiffer mschif...@universe-factory.net In heterogenous networks, setting the number of broadcasts to differing values on different interfaces can be beneficial. E.g

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: make number of broadcasts configurable per hardif

2013-03-08 Thread Matthias Schiffer
On 03/08/2013 09:06 PM, Marek Lindner wrote: On Saturday, March 09, 2013 03:42:34 Matthias Schiffer wrote: In general, I like the idea but the approach isn't the best. Can't we automate these settings instead of adding hundreds of little knobs nobody will understand ? Why not detecting wifi

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: filter out invalid DAT entries

2013-01-24 Thread Matthias Schiffer
On 01/24/2013 02:47 PM, Marek Lindner wrote: On Thursday, January 24, 2013 21:38:58 Antonio Quartulli wrote: I thought the same, but in batadv_arp_get_type() we have a general check that discards wrong/bogus ARP request. Here instead we are filtering correct ARP requests that DAT should not

[B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: check for more types of invalid IP addresses in DAT

2013-01-24 Thread Matthias Schiffer
There are more types of IP addresses that may appear in ARP packets that we don't want to process. While some of these should never appear in sane ARP packets, a 0.0.0.0 source is used for duplicate address detection and thus seen quite often. Signed-off-by: Matthias Schiffer mschif...@universe

[B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: filter ARP packets with invalid MAC addresses in DAT

2013-01-24 Thread Matthias Schiffer
We never want multicast MAC addresses in the Distributed ARP Table, so it's best to completely ignore ARP packets containing them where we expect unicast addresses. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- distributed-arp-table.c | 13 + 1 file changed, 13

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: filter out invalid DAT entries

2013-01-24 Thread Matthias Schiffer
Okay, here is the new version, in two parts. I like the first version better, but maybe this one is more consistent... Matthias

Re: [B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: filter ARP packets with invalid MAC addresses in DAT

2013-01-24 Thread Matthias Schiffer
On 01/24/2013 06:18 PM, Matthias Schiffer wrote: We never want multicast MAC addresses in the Distributed ARP Table, so it's best to completely ignore ARP packets containing them where we expect unicast addresses. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net

[B.A.T.M.A.N.] [PATCH 1/2] batman-adv: fix skb leak in batadv_dat_snoop_incoming_arp_reply()

2013-01-23 Thread Matthias Schiffer
The callers of batadv_dat_snoop_incoming_arp_reply() assume the skb has been freed when it returns true; fix this by calling kfree_skb before returning as it is done in batadv_dat_snoop_incoming_arp_request(). Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- distributed-arp

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: filter out invalid DAT entries

2013-01-23 Thread Matthias Schiffer
for ARP (zeronet, loopback, multicast, etc.), but I wanted to keep the patch as simple as possible. If you think these should be filtered as well, I'll prepare a v2. Matthias On 01/23/2013 10:07 PM, Antonio Quartulli wrote: On Wed, Jan 23, 2013 at 06:11:54 +0100, Matthias Schiffer wrote: Due

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: filter out invalid DAT entries

2013-01-23 Thread Matthias Schiffer
On 01/23/2013 10:39 PM, Matthias Schiffer wrote: ipv4_is_zeronet() checks if the first byte of the address is zero, to my knowledge there is no special funtion for checking for the unspecified address, as the case is trivial and independent of byte ordering. It might make sense though

Re: [B.A.T.M.A.N.] [PATCH 3/5] batman-adv: enable roaming packets to carry flags

2012-06-26 Thread Matthias Schiffer
On 06/26/2012 11:22 PM, Sven Eckelmann wrote: On Tuesday 26 June 2012 22:00:20 Antonio Quartulli wrote: In case of client-roaming it would be useful to carry TT flags along with the client entry. Information contained in the flags could be used on the new mesh node for several reasons (e.g.

Re: [B.A.T.M.A.N.] packets not processed by batman on eth0

2012-06-21 Thread Matthias Schiffer
Hi, it might be your VLAN configuration - as far as I know, 0 is not a valid VLAN id. But I also found that batman-adv doesn't work on VLAN interfaces on my OpenWRT routers. As a workaround you can create a new bridge that only contains the VLAN interface and add the bridge to bat0 instead.

Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: fix visualization output without neighbors on the primary interface

2012-05-10 Thread Matthias Schiffer
On 05/09/2012 06:10 PM, Martin Hundebøll wrote: While reading about TLV's on wikipedia[1], I came across a MAC discovery protocol[2], LLDP, which eventually lead me to OpenLLDP[3]. If this also works on 802.11, I think we have a winner :) Okay, so I tested 4 open-source LLDP implementations

Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: fix visualization output without neighbors on the primary interface

2012-05-10 Thread Matthias Schiffer
On 05/10/2012 10:19 PM, Marek Lindner wrote: On Friday, May 11, 2012 03:47:30 Matthias Schiffer wrote: 2nd, I think without batman-adv specific extensions LLDP isn't very useful, as the LLDP daemon only cares about the bat0/bridge MAC addresses, and not the hardif MAC addresses which

Re: [B.A.T.M.A.N.] The current state of the batman-adv vis code

2012-05-09 Thread Matthias Schiffer
On 05/09/2012 01:04 PM, Marek Lindner wrote: On Tuesday, May 08, 2012 22:18:34 Matthias Schiffer wrote: How the rcu replace / update mechanism works is pretty clear to me. My question geared towards our own code base. At which point would you use this rcu update ? Every time an element

Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: fix visualization output without neighbors on the primary interface

2012-05-08 Thread Matthias Schiffer
On 05/08/2012 08:04 AM, Marek Lindner wrote: On Monday, May 07, 2012 19:10:19 Matthias Schiffer wrote: On 05/07/2012 08:40 AM, Marek Lindner wrote: If you wish to replace the mac addresses with readable name you can simply use a bat-hosts file to tell batctl which mac address should

Re: [B.A.T.M.A.N.] The current state of the batman-adv vis code

2012-05-08 Thread Matthias Schiffer
On 05/08/2012 07:59 AM, Marek Lindner wrote: On Tuesday, May 08, 2012 03:35:07 Matthias Schiffer wrote: overall hash consistency might be a issue though - I would propose adding a hash_update function that updates a hash entry without deleting and re-adding the hlist node. Can you give

[B.A.T.M.A.N.] [PATCH] batman-adv: fix locking in hash_add()

2012-05-08 Thread Matthias Schiffer
. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- hash.h | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/hash.h b/hash.h index 7bcb98f..2e0409a 100644 --- a/hash.h +++ b/hash.h @@ -109,26 +109,23 @@ static inline int hash_add(struct

Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: fix visualization output without neighbors on the primary interface

2012-05-07 Thread Matthias Schiffer
On 05/07/2012 08:40 AM, Marek Lindner wrote: If you wish to replace the mac addresses with readable name you can simply use a bat-hosts file to tell batctl which mac address should be replaced. Check the bat-hosts section in our batctl online manpage:

[B.A.T.M.A.N.] The current state of the batman-adv vis code

2012-05-07 Thread Matthias Schiffer
Hi, after reading Marek's and Sven's comments to my question about the vis code, and looking at the code a bit I came to the following conclusion about the first part of the cleanup, the finishing of the RCU conversion of the vis code: It should be possible to get rid of the vis_hash_lock

Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: fix visualization output without neighbors on the primary interface

2012-05-06 Thread Matthias Schiffer
On 05/06/2012 10:14 PM, Simon Wunderlich wrote: Your patch does the trick, although I think this ugly function could use a rewrite. First counting bytes and then allocating this size to do exactly the same thing again is not really good style. If you would like to volunteer to do this job

[B.A.T.M.A.N.] [PATCH] batman-adv: fix visualization output without neighbors on the primary interface

2012-05-05 Thread Matthias Schiffer
. Fix this by always emitting a primary entry. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- vis.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/vis.c b/vis.c index cec216f..b293bdb 100644 --- a/vis.c +++ b/vis.c @@ -207,7 +207,6

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix visualization output without neighbors on the primary interface

2012-05-05 Thread Matthias Schiffer
Oops, sorry about that. I'll send a fixed version. Matthias On 05/05/2012 05:29 PM, Sven Eckelmann wrote: WARNING: line over 80 characters #102: FILE: vis.c:236: + if (compare_eth(entries[j].src, packet-vis_orig)) WARNING: line over 80 characters #123:

[B.A.T.M.A.N.] [PATCHv2] batman-adv: fix visualization output without neighbors on the primary interface

2012-05-05 Thread Matthias Schiffer
. Fix this by always emitting a primary entry. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- vis.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/vis.c b/vis.c index cec216f..c515927 100644 --- a/vis.c +++ b/vis.c @@ -207,7 +207,6