summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bat_iv_ogm.c
Commit message (Collapse)AuthorAgeFilesLines
* batman-adv: prepare lq_update_lock to be shared among different protocolsMarek Lindner2012-05-131-5/+4
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: fix checkpatch string complaintMarek Lindner2012-05-111-2/+2
| | | | | | | Regression introduced by: f76d019194e0a88c57371df169ecc979690a04c2 Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: avoid temporary routing loops by being strict on forwarded OGMsMarek Lindner2012-05-111-29/+31
| | | | | | | | | | | | | | | | | 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 <lindner_marek@yahoo.de> Acked-by: Daniele Furlan <daniele.furlan@gmail.com> Tested-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
* batman-adv: refactoring API: find generalized name for bat_ogm_update_mac ↵Marek Lindner2012-05-111-9/+9
| | | | | | | callback Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: ignore protocol packets if the interface did not enable this ↵Marek Lindner2012-05-111-0/+7
| | | | | | | | protocol Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: split neigh_new function into generic and batman iv specific partsMarek Lindner2012-05-111-6/+34
| | | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: rename last_valid to last_seenMarek Lindner2012-05-111-4/+4
| | | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: register batman ogm receive function during protocol initMarek Lindner2012-05-111-4/+27
| | | | | | | | | | | 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 <lindner_marek@yahoo.de> Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: introduce is_single_hop_neigh variable to increase readabilityMarek Lindner2012-05-111-7/+9
| | | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: skip the window protection test when the originator has no ↵Antonio Quartulli2012-04-181-1/+2
| | | | | | | | | | | | | | | neighbours 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 <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: print OGM seq numbers as unsigned intAntonio Quartulli2012-04-181-4/+4
| | | | | | | 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 <ordex@autistici.org>
* batman-adv: use ETH_HLEN instead of sizeof(struct ethhdr)Antonio Quartulli2012-04-181-4/+3
| | | | | | | | 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 <ordex@autistici.org>
* batman-adv: mark existing ogm variables as batman ivMarek Lindner2012-04-181-2/+2
| | | | | | | | 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 <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: rename BATMAN_OGM_LEN to BATMAN_OGM_HLENMarek Lindner2012-04-181-6/+6
| | | | | | | | | 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 <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: refactoring API: find generalized name for bat_ogm_init_primary ↵Marek Lindner2012-04-181-2/+2
| | | | | | | callback Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: handle routing code initialization properlyMarek Lindner2012-04-181-1/+10
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: add iface_disable() callback to routing APIMarek Lindner2012-04-181-0/+7
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: randomize initial seqno to avoid collisionMarek Lindner2012-04-181-0/+5
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: refactoring API: find generalized name for bat_ogm_init callbackMarek Lindner2012-04-181-2/+2
| | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: Replace bitarray operations with bitmapSven Eckelmann2012-04-111-7/+8
| | | | | | | | | bitarray.c consists mostly of functionality that is already available as part of the standard kernel API. batman-adv could use architecture optimized code and reduce the binary size by switching to the standard functions. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: Don't begin block comments with only a /* lineSven Eckelmann2012-03-111-2/+1
| | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Ignore 80-chars per line limits for stringsSven Eckelmann2012-03-111-32/+22
| | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Update copyright yearsSven Eckelmann2012-02-171-1/+1
| | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: convert batman iv algorithm to use dynamic infrastructureMarek Lindner2012-02-171-85/+94
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: add infrastructure to change routing algorithm at runtimeMarek Lindner2012-02-171-0/+10
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: simplify bat_ogm_receive API callMarek Lindner2012-02-171-4/+7
| | | | | | | | Most of the values in that call are derived from the skb, so we can hand over the skb instead. Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Explicitly mark the common header structureSven Eckelmann2012-02-171-23/+24
| | | | | | | | | | | | | | 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 <sven@narfation.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: agglomerate all batman iv ogm sending functions in the batman iv ↵Marek Lindner2011-09-081-4/+498
| | | | | | | | | | file In the process the batman iv OGM aggregation code could be merged into the batman iv code base which makes the separate aggregation files superfluous. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: move routing packet initialization into corresponding fileMarek Lindner2011-09-081-0/+37
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: agglomerate all batman iv ogm processing functions in a single fileMarek Lindner2011-09-081-0/+639
In preparation of the upcoming improved routing algorithm the code based has to be re-organized to allow choosing the routing algorithm at compile time. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
OpenPOWER on IntegriCloud