[B.A.T.M.A.N.] [PATCH] batman-adv: Do not add multicast MAC addresses to translation table

2012-10-17 Thread Linus Lüssing
The current translation table mechanism is not suitable for multicast addresses and we are currently flooding such frames anyway. Therefore this patch prevents multicast MAC addresses being added to the translation table. Signed-off-by: Linus Lüssing linus.luess...@web.de --- soft-interface.c |

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix broadcast packet CRC calculation

2012-10-17 Thread Sven Eckelmann
On Wednesday 17 October 2012 13:38:30 Linus Lüssing wrote: So far the crc16 checksum for a batman-adv broadcast data packet, received on a batman-adv hard interface, was calculated over zero bytes of its content leading to many incoming broadcast data packets wrongly being dropped. This

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Do not add multicast MAC addresses to translation table

2012-10-17 Thread Antonio Quartulli
On Wed, Oct 17, 2012 at 03:07:35PM +0200, Linus Lüssing wrote: The current translation table mechanism is not suitable for multicast addresses and we are currently flooding such frames anyway. Therefore this patch prevents multicast MAC addresses being added to the translation table.

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix broadcast packet CRC calculation

2012-10-17 Thread Sven Eckelmann
On Wednesday 17 October 2012 13:38:30 Linus Lüssing wrote: So far the crc16 checksum for a batman-adv broadcast data packet, received on a batman-adv hard interface, was calculated over zero bytes of its content leading to many incoming broadcast data packets wrongly being dropped. This

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix broadcast packet CRC calculation

2012-10-17 Thread Sven Eckelmann
On Wednesday 17 October 2012 15:50:50 Sven Eckelmann wrote: On Wednesday 17 October 2012 13:38:30 Linus Lüssing wrote: So far the crc16 checksum for a batman-adv broadcast data packet, received on a batman-adv hard interface, was calculated over zero bytes of its content leading to many

Re: [B.A.T.M.A.N.] [PATCHv2 2/2] batman-adv: Fix potential broadcast BLA-duplicate-check race condition

2012-10-17 Thread Simon Wunderlich
Looks good, although I don't think this will happen very often - it is only called when receiving packets, and AFAIK there can only be multiple threads when using multiple interfaces. Anyway, doing the spinlock shouldn't hurt and might save us some pain when this function is used more often, or

Re: [B.A.T.M.A.N.] [PATCHv2 1/2] batman-adv: Fix broadcast packet CRC calculation

2012-10-17 Thread Simon Wunderlich
Good catch! When can I buy you the beer? :D Acked-by: Simon Wunderlich s...@hrz.tu-chemnitz.de On Wed, Oct 17, 2012 at 02:53:04PM +0200, Linus Lüssing wrote: So far the crc16 checksum for a batman-adv broadcast data packet, received on a batman-adv hard interface, was calculated over zero

[B.A.T.M.A.N.] [RFC] batman-adv: Add function to calculate crc32c for the skb payload

2012-10-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- main.c | 34 ++ main.h |1 + 2 files changed, 35 insertions(+) diff --git a/main.c b/main.c index 70797de..122c675 100644 --- a/main.c +++ b/main.c @@ -33,6 +33,7 @@ #include vis.h #include hash.h

Re: [B.A.T.M.A.N.] [RFC] batman-adv: Add function to calculate crc32c for the skb payload

2012-10-17 Thread Martin Hundebøll
On 2012-10-17 17:59, Sven Eckelmann wrote: +__be32 batadv_crc32(const struct sk_buff *skb, u8 *payload_ptr) +{ + u32 crc = 0; + struct sk_buff *iter; + size_t skip_len, read_len; + const skb_frag_t *f; + int i; + + skip_len = payload_ptr - skb-data; +

[B.A.T.M.A.N.] [RFCv2] batman-adv: Add function to calculate crc32c for the skb payload

2012-10-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- v2: - Added compat code for kernel like 2.6.39 - Use kmap_atomic to get the page compat.h | 20 main.c | 38 ++ main.h |1 + 3 files changed, 59 insertions(+) diff --git

Re: [B.A.T.M.A.N.] [PATCHv2 1/2] batman-adv: Fix broadcast packet CRC calculation

2012-10-17 Thread Marek Lindner
On Wednesday, October 17, 2012 22:17:33 Simon Wunderlich wrote: Good catch! When can I buy you the beer? :D Acked-by: Simon Wunderlich s...@hrz.tu-chemnitz.de Applied in revision 2cebfac. Thanks, Marek

Re: [B.A.T.M.A.N.] [PATCHv2 2/2] batman-adv: Fix potential broadcast BLA-duplicate-check race condition

2012-10-17 Thread Marek Lindner
On Wednesday, October 17, 2012 22:17:05 Simon Wunderlich wrote: Looks good, although I don't think this will happen very often - it is only called when receiving packets, and AFAIK there can only be multiple threads when using multiple interfaces. Anyway, doing the spinlock shouldn't hurt

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Do not add multicast MAC addresses to translation table

2012-10-17 Thread Linus Lüssing
Gesendet: Mittwoch, 17. Oktober 2012 um 15:36 Uhr Von: Antonio Quartulli or...@autistici.org An: The list for a Better Approach To Mobile Ad-hoc Networking b.a.t.m.a.n@lists.open-mesh.org Betreff: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Do not add multicast MAC addresses to translation

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Do not add multicast MAC addresses to translation table

2012-10-17 Thread Antonio Quartulli
On Wed, Oct 17, 2012 at 08:43:05PM +0200, Linus Lüssing wrote: Gesendet: Mittwoch, 17. Oktober 2012 um 15:36 Uhr Von: Antonio Quartulli or...@autistici.org An: The list for a Better Approach To Mobile Ad-hoc Networking b.a.t.m.a.n@lists.open-mesh.org Betreff: Re: [B.A.T.M.A.N.]

[B.A.T.M.A.N.] [RFCv3] batman-adv: Add function to calculate crc32c for the skb payload

2012-10-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- v3: Now with support for kernels till 2.6.29 compat.h | 34 ++ main.c | 38 ++ main.h |1 + 3 files changed, 73 insertions(+) diff --git a/compat.h b/compat.h

[B.A.T.M.A.N.] Web-based Visualisation Tool of Choice for batman-adv?

2012-10-17 Thread Steve Song
Hi all, Is there an obvious choice for web-based visualisation of batman-adv networks? We currently use a custom product (SPUD - http://dev.villagetelco.org/trac/browser/spud/trunk/INSTALL) built specifically for Village Telco but would prefer to join our efforts to a broader community-based

Re: [B.A.T.M.A.N.] Web-based Visualisation Tool of Choice for batman-adv?

2012-10-17 Thread Antonio Quartulli
On Wed, Oct 17, 2012 at 04:44:51PM -0300, Steve Song wrote: Hi all, Is there an obvious choice for web-based visualisation of batman-adv networks? We currently use a custom product (SPUD - http://dev.villagetelco.org/trac/browser/spud/trunk/INSTALL) built specifically for Village Telco but

[B.A.T.M.A.N.] [PATCH 2/4] alfred: Fix parsing of short program parameter -v and -V

2012-10-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 0315fe3..96e401a 100644 --- a/main.c +++ b/main.c @@ -78,7 +78,7 @@ struct globals *alfred_init(int argc, char *argv[])

[B.A.T.M.A.N.] [PATCH 3/4] alfred: Test for failed global memory allocation

2012-10-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- main.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 96e401a..ccb72cd 100644 --- a/main.c +++ b/main.c @@ -67,11 +67,11 @@ struct globals *alfred_init(int argc, char *argv[]) };

[B.A.T.M.A.N.] [PATCH 4/4] alfred: Fix test for failed sendbuf allocation

2012-10-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- recv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recv.c b/recv.c index dce7e50..8ddf7ab 100644 --- a/recv.c +++ b/recv.c @@ -217,7 +217,7 @@ int send_alfred_packet(struct globals *globals, uint8_t *dest, void *buf,

Re: [B.A.T.M.A.N.] [RFCv3] batman-adv: Add function to calculate crc32c for the skb payload

2012-10-17 Thread Marek Lindner
On Thursday, October 18, 2012 03:10:39 Sven Eckelmann wrote: Signed-off-by: Sven Eckelmann s...@narfation.org --- v3: Now with support for kernels till 2.6.29 compat.h | 34 ++ main.c | 38 ++ main.h |1 + 3

[B.A.T.M.A.N.] [PATCH] batman-adv: Fix broadcast duplist for fragmentation

2012-10-17 Thread Simon Wunderlich
If the skb is fragmented, the checksum must be computed on the individual fragments, just using skb-data may fail on fragmented data. Instead of doing linearizing the packet, use the new batadv_crc32 to do that more efficiently- it should not hurt replacing the old crc16 by the new crc32.

Re: [B.A.T.M.A.N.] [PATCH 2/4] alfred: Fix parsing of short program parameter -v and -V

2012-10-17 Thread Simon Wunderlich
Applied in revision 3c2de69. Thanks, Simon On Wed, Oct 17, 2012 at 09:55:56PM +0200, Sven Eckelmann wrote: Signed-off-by: Sven Eckelmann s...@narfation.org --- main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 0315fe3..96e401a