23 Aug, 2012
3 commits
-
Signed-off-by: Sven Eckelmann
Signed-off-by: Antonio Quartulli -
Signed-off-by: Sven Eckelmann
Signed-off-by: Antonio Quartulli -
The structure batadv_priv grows everytime a new feature is introduced. It gets
hard to find the parts of the struct that belongs to a specific feature. This
becomes even harder by the fact that not every feature uses a prefix in the
member name.The variables for bridge loop avoidence, gateway handling, translation table
and visualization server are moved into separate structs that are included in
the bat_priv main struct.Signed-off-by: Sven Eckelmann
Signed-off-by: Antonio Quartulli
02 Jul, 2012
6 commits
-
The reserved fields in batman-adv packets are not set to a constant value. The
content of these memory regions is leaked unintentionally to the network.This regression was introduced in 3b27ffb00fbe9d9189715ea13ce8712e2f0cb0c5
Signed-off-by: Sven Eckelmann
Signed-off-by: Antonio Quartulli -
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann
28 Jun, 2012
7 commits
-
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
The vis output doesn't need to be buffered in an character buffer before it can
be send to the userspace program that reads from the vis debug file.Signed-off-by: Sven Eckelmann
-
Signed-off-by: Sven Eckelmann
-
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.Signed-off-by: Sven Eckelmann
25 Jun, 2012
4 commits
-
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.Signed-off-by: Sven Eckelmann
-
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.Signed-off-by: Sven Eckelmann
-
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.Signed-off-by: Sven Eckelmann
-
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.Signed-off-by: Sven Eckelmann
21 Jun, 2012
6 commits
-
batman-adv doesn't follow the style for multiline comments that David S. Miller
prefers. All comments should be reformatted to follow this consistent style to
make the code slightly more readable.Signed-off-by: Sven Eckelmann
-
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.Reported-by: David Miller
Signed-off-by: Sven Eckelmann -
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.Reported-by: David Miller
Signed-off-by: Sven Eckelmann -
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.Reported-by: David Miller
Signed-off-by: Sven Eckelmann -
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.Reported-by: David Miller
Signed-off-by: Sven Eckelmann -
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.Reported-by: David Miller
Signed-off-by: Sven Eckelmann
19 Jun, 2012
2 commits
-
The primary entry and the corresponding secondary entries are missing when there
are no neighbors on the primary interface. This also causes the TT entries to
miss and makes nodes with multiply secondary interface fall apart since there
is no way to see they are related without a primary entry.Fix this by always emitting a primary entry.
Signed-off-by: Matthias Schiffer
Signed-off-by: Sven Eckelmann -
Signed-off-by: Sven Eckelmann
18 Apr, 2012
1 commit
-
Instead of using sizeof(struct ethhdr) it is strongly recommended to use the
kernel macro ETH_HLEN. This patch substitute each occurrence of the former
expressione with the latter one.Signed-off-by: Antonio Quartulli
17 Feb, 2012
3 commits
-
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner -
To increase readability the has_timed_out() functions has been introduced.
This patch converts existing time_after() calls to use this wrapper
function (if applicable).
This patch also converts all timeouts to miliseconds to be consistent.Signed-off-by: Marek Lindner
Signed-off-by: Simon Wunderlich -
All batman-adv packets have a common 3 byte header. It can be used to share
some code between different code paths, but it was never explicit stated that
this header has to be always the same for all packets. Therefore, new code
changes always have the problem that they may accidently introduce regressions
by moving some elements around.A new structure is introduced that contains the common header and makes it
easier visible that these 3 bytes have to be the same for all on-wire packets.Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
20 Nov, 2011
2 commits
-
Several functions in the translation table management code assume that the
tt_global_entry and tt_local_entry structures have the same initial fields such
as 'addr' and 'hash_entry'. To improve the code readability and to avoid
mistakes in later changes, a common substructure that substitute the shared
fields has been introduced (struct tt_common_entry).Thanks to this modification, it has also been possible to slightly reduce the
code length by merging some functions like compare_ltt/gtt() and
tt_local/global_hash_find()Signed-off-by: Antonio Quartulli
Signed-off-by: Sven Eckelmann -
There are two reasons for this fix:
- the result of choose_orig() and vis_choose() is an index and therefore it can't
be negative. Hence it is correct to make the return type unsigned too.- sizeof(int) may not be the same on ALL the architectures. Since we plan to use
choose_orig() as DHT hash function, we need to guarantee that, given the same
argument, the result is the same. Then it is correct to explicitly express
the size of the return type (and the second argument). Since the expected
length is currently 4, uint32_t is the most convenient choice.Signed-off-by: Antonio Quartulli
Signed-off-by: Sven Eckelmann
08 Sep, 2011
1 commit
-
Removing unnecessary messages saves code and text.
Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.Signed-off-by: Joe Perches
Signed-off-by: Marek Lindner
22 Aug, 2011
2 commits
-
Several typos have been corrected and some sentences have been rephrased
Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner -
hash_add() returns 0 on success while returns -1 either on error and on
entry already present. The caller could use such information to select
its behaviour. For this reason it is useful that hash_add() returns -1
in case on error and returns 1 in case of entry already present.Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner
20 Jun, 2011
1 commit
-
The local and the global translation-tables are now lock free and rcu
protected.Signed-off-by: Antonio Quartulli
Acked-by: Simon Wunderlich
Signed-off-by: Sven Eckelmann
30 May, 2011
2 commits
-
smallest_signed_int(), seq_before() and seq_after() are very useful
functions that help to handle comparisons between sequence numbers.
However they were only defined in vis.c. With this patch every
batman-adv function will be able to use them.Signed-off-by: Antonio Quartulli
Signed-off-by: Sven Eckelmann -
Documentation/CodingStyle recommends to use the form
p = kmalloc(sizeof(*p), ...);
to calculate the size of a struct and not the version where the struct
name is spelled out to prevent bugs when the type of p changes. This
also seems appropriate for manipulation of buffers when they are
directly associated with p.Signed-off-by: Sven Eckelmann