14 May, 2012
7 commits
-
When trying to add a new tt_local_entry, if such entry already exists, we have
to ensure that the TT_CLIENT_PENDING flag is not set, otherwise the entry will
be deleted soon.Reported-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
Signed-off-by: Sven Eckelmann
Signed-off-by: Antonio Quartulli -
Signed-off-by: Sven Eckelmann
Signed-off-by: Antonio Quartulli -
Reported-by: David Laight
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
In case of a client X roaming from a generic node A to another node B, it is
possible that a third node C gets A's OGM but not B's. At this point in time, if
C wants to send data to X it will send a unicast packet destined to A. The
packet header will contain A's last ttvn (C got A's OGM and so it knows it).The packet will travel towards A without being intercepted because the ttvn
contained in its header is the newest for A.Once A will receive the packet, A's state will not report to be in a "roaming
phase" (because, after a roaming, once A sends out its OGM, all the changes are
committed and the node is considered not to be in the roaming state anymore)
and it will match the ttvn carried by the packet. Therefore there is no reason
for A to try to alter the packet's route, thus dropping the packet because the
destination client is not there anymore.However, C is well aware that it's routing information towards the client X is
outdated as it received an OGM from A saying that the client roamed away.
Thanks to this detail, this patch introduces a small change in behaviour: as
long as C is in the state of not knowing the new location of client X it will
forward the traffic to its last known location using ttvn-1 of the destination.
By using an older ttvn node A will be forced to re-route the packet.
Intermediate nodes are also allowed to update the packet's destination as long
as they have the information about the client's new location.Signed-off-by: Antonio Quartulli
-
Whenever we want to access headers only, we do not need to linearise the whole
packet. Instead we can use pskb_may_pull()Signed-off-by: Antonio Quartulli
11 May, 2012
15 commits
-
translation_table.{c,h} have been heavily modified by another contributor and
for legal purposes it is better to include his name into the contributor listSigned-off-by: Antonio Quartulli
-
update copyright years in order to include 2012
Signed-off-by: Antonio Quartulli
-
Regression introduced by: f76d019194e0a88c57371df169ecc979690a04c2
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
batman-adv would forward OGMs from non-besthops while replacing the the TQ
and TTL values with the values from the best hop. In certain corner cases
this leads to a temporary routing loop.
This patch changes this behavior: Only packets from best next hops are
forwarded - TQ and TTL values won't be replaced anymore. However, the protocol
needs to rebroadcast OGMs from single hop neighbors regardless of whether or
not they are the best hop. To handle this case a new flag is introduced to
alert neighboring nodes about the forwarded OGM that is not from my best
next hop. It is to be discarded by all nodes except for the one originating
the OGM.Signed-off-by: Marek Lindner
Acked-by: Daniele Furlan
Tested-by: Simon Wunderlich -
This allows us to easily add a sysfs parameter for an unsigned int
later, which is not for a batman mesh interface (e.g. bat0), but for a
common interface instead. It allows reading and writing an atomic_t in
hard_iface (instead of bat_priv compared to the mesh variant).Developed by Linus during a 6 months trainee study period in Ascom
(Switzerland) AG.Signed-off-by: Linus Luessing
Signed-off-by: Marek Lindner -
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Reported-by: Simon Wunderlich
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Acked-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Acked-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Acked-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
The B.A.T.M.A.N. IV OGM receive function still was hard-coded although
it is a routing protocol specific function. This patch takes advantage
of the dynamic packet handler registration to remove the hard-coded
function calls.Signed-off-by: Marek Lindner
Acked-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
The packet handler array replaces the growing switch statement, thus
dealing with incoming packets in a more efficient way. It also adds
to possibility to register packet handlers on the fly.Signed-off-by: Marek Lindner
Acked-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Acked-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
In is_type_dhcprequest(), while parsing a DHCP message, if the entry we found in
the option list is neither a padding nor the dhcp-type, we have to ignore it and
jump as many bytes as its length + 1. The "+ 1" byte is given by the subtype
field itself that has to be jumped too.Reported-by: Marek Lindner
Signed-off-by: Antonio Quartulli
18 Apr, 2012
13 commits
-
When we receive an OGM from from a node for the first time, the last_real_seqno
field of the orig_node structure has not been initialised yet. The value of this
field is used to compute the current ogm-seqno window and therefore the
protection mechanism will probably drop the packet due to an out-of-window error.
To avoid this situation this patch adds a check to skip the window protection
mechanism if no neighbour nodes have already been added. When the first
neighbour node is added, the last_real_seqno field is initialised too.Reported-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
OGM sequence numbers are declared as uint32_t and so they have to printed
using %u instead of %d in order to avoid wrong representations.Signed-off-by: Antonio Quartulli
-
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
-
The coming protocol changes also will have a part called "OGM". That
makes it necessary to introduce a distinction in the code base.Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Using BATMAN_OGM_LEN leaves one with the impression that this is
the full packet size which is not the case. Therefore the variable
is renamed.Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Remove an accidentally added duplicated line in a function comment
Signed-off-by: Antonio Quartulli
-
Before sending out a TT_Request packet we must convert the tt_crc field value
to network order (since it is 16bits long).Reported-by: Al Viro
Signed-off-by: Antonio Quartulli
16 Apr, 2012
1 commit
-
Use of "unsigned int" is preferred to bare "unsigned" in net tree.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
11 Apr, 2012
4 commits
-
The define CONFIG_BATMAN_ADV_BLA switches the bridge loop avoidance
on - skip it, and the bridge loop avoidance is not compiled in.This is useful if binary size should be saved or the feature is
not needed.Signed-off-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
backbone gateways may be part of the same LAN, but participate
in different meshes. With this patch, backbone gateways form groups by
applying the groupid of another backbone gateway if it is higher. After
forming the group, they only accept messages from backbone gateways of
the same group.Signed-off-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
Signed-off-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
When multiple backbone gateways relay the same broadcast from the
backbone into the mesh, other nodes in the mesh may receive this
broadcast multiple times. To avoid this, the crc checksums of
received broadcasts are recorded and new broadcast packets with
the same content may be dropped if received by another gateway.Signed-off-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli