aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
Commit message (Collapse)AuthorAgeFilesLines
* batman-adv: Use "__attribute__" shortcut macrosSven Eckelmann2011-01-163-12/+12
| | | | | | | | | | | | Linux 2.6.21 defines different macros for __attribute__ which are also used inside batman-adv. The next version of checkpatch.pl warns about the usage of __attribute__((packed))). Linux 2.6.33 defines an extra macro __always_unused which is used to assist source code analyzers and can be used to removed the last existing __attribute__ inside the source code. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Even Batman should not dereference NULL pointersJesper Juhl2011-01-131-2/+4
| | | | | | | | | | | | | | | | There's a problem in net/batman-adv/unicast.c::frag_send_skb(). dev_alloc_skb() allocates memory and may fail, thus returning NULL. If this happens we'll pass a NULL pointer on to skb_split() which in turn hands it to skb_split_inside_header() from where it gets passed to skb_put() that lets skb_tail_pointer() play with it and that function dereferences it. And thus the bat dies. While I was at it I also moved the call to dev_alloc_skb() above the assignment to 'unicast_packet' since there's no reason to do that assignment if the memory allocation fails. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Return hna count on local buffer fillSven Eckelmann2010-12-201-1/+1
| | | | | | | | hna_local_fill_buffer must return the number of added hna entries and not the last checked hash bucket. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Add batman-adv meshing protocolSven Eckelmann2010-12-1640-0/+9944
B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is a routing protocol for multi-hop ad-hoc mesh networks. The networks may be wired or wireless. See http://www.open-mesh.org/ for more information and user space tools. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: David S. Miller <davem@davemloft.net>