summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/translation-table.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2013-04-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/emulex/benet/be_main.c drivers/net/ethernet/intel/igb/igb_main.c drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c include/net/scm.h net/batman-adv/routing.c net/ipv4/tcp_input.c The e{uid,gid} --> {uid,gid} credentials fix conflicted with the cleanup in net-next to now pass cred structs around. The be2net driver had a bug fix in 'net' that overlapped with the VLAN interface changes by Patrick McHardy in net-next. An IGB conflict existed because in 'net' the build_skb() support was reverted, and in 'net-next' there was a comment style fix within that code. Several batman-adv conflicts were resolved by making sure that all calls to batadv_is_my_mac() are changed to have a new bat_priv first argument. Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO rewrite in 'net-next', mostly overlapping changes. Thanks to Stephen Rothwell and Antonio Quartulli for help with several of these merge resolutions. Signed-off-by: David S. Miller <davem@davemloft.net>
| * batman-adv: make is_my_mac() check for the current mesh onlyAntonio Quartulli2013-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | On a multi-mesh node (a node running more than one batman-adv virtual interface) batadv_is_my_mac() has to check MAC addresses of hard interfaces belonging to the current mesh only. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* | batman-adv: don't use !! in bool conversionAntonio Quartulli2013-03-131-2/+2
| | | | | | | | | | | | | | | | | | In C standard any expression different from 0 will be converted to 'true' when casting to bool (whatever is the length of the value). Therefore all the "!!" conversions can be removed. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* | batman-adv: replace redundant primary_if_get callsMarek Lindner2013-03-131-19/+6Star
|/ | | | | | | | | The batadv_priv struct carries a pointer to its own interface struct. Therefore, it is not necessary to retrieve the soft_iface via the primary interface. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* hlist: drop the node parameter from iteratorsSasha Levin2013-02-281-47/+35Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure why, but the hlist for each entry iterators were conceived list_for_each_entry(pos, head, member) The hlist ones were greedy and wanted an extra parameter: hlist_for_each_entry(tpos, pos, head, member) Why did they need an extra pos parameter? I'm not quite sure. Not only they don't really need it, it also prevents the iterator from looking exactly like the list iterator, which is unfortunate. Besides the semantic patch, there was some manual work required: - Fix up the actual hlist iterators in linux/list.h - Fix up the declaration of other iterators based on the hlist ones. - A very small amount of places were using the 'node' parameter, this was modified to use 'obj->member' instead. - Coccinelle didn't handle the hlist_for_each_entry_safe iterator properly, so those had to be fixed up manually. The semantic patch which is mostly the work of Peter Senna Tschudin is here: @@ iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host; type T; expression a,c,d,e; identifier b; statement S; @@ -T b; <+... when != b ( hlist_for_each_entry(a, - b, c, d) S | hlist_for_each_entry_continue(a, - b, c) S | hlist_for_each_entry_from(a, - b, c) S | hlist_for_each_entry_rcu(a, - b, c, d) S | hlist_for_each_entry_rcu_bh(a, - b, c, d) S | hlist_for_each_entry_continue_rcu_bh(a, - b, c) S | for_each_busy_worker(a, c, - b, d) S | ax25_uid_for_each(a, - b, c) S | ax25_for_each(a, - b, c) S | inet_bind_bucket_for_each(a, - b, c) S | sctp_for_each_hentry(a, - b, c) S | sk_for_each(a, - b, c) S | sk_for_each_rcu(a, - b, c) S | sk_for_each_from -(a, b) +(a) S + sk_for_each_from(a) S | sk_for_each_safe(a, - b, c, d) S | sk_for_each_bound(a, - b, c) S | hlist_for_each_entry_safe(a, - b, c, d, e) S | hlist_for_each_entry_continue_rcu(a, - b, c) S | nr_neigh_for_each(a, - b, c) S | nr_neigh_for_each_safe(a, - b, c, d) S | nr_node_for_each(a, - b, c) S | nr_node_for_each_safe(a, - b, c, d) S | - for_each_gfn_sp(a, c, d, b) S + for_each_gfn_sp(a, c, d) S | - for_each_gfn_indirect_valid_sp(a, c, d, b) S + for_each_gfn_indirect_valid_sp(a, c, d) S | for_each_host(a, - b, c) S | for_each_host_safe(a, - b, c, d) S | for_each_mesh_entry(a, - b, c, d) S ) ...+> [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c] [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c] [akpm@linux-foundation.org: checkpatch fixes] [akpm@linux-foundation.org: fix warnings] [akpm@linux-foudnation.org: redo intrusive kvm changes] Tested-by: Peter Senna Tschudin <peter.senna@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Gleb Natapov <gleb@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* batman-adv: fix local translation table outputAntonio Quartulli2013-01-281-2/+2
| | | | | | | | | | | The last-seen field has to be printed for all the local entries but the one marked with the no-purge flag Introduced by 15727323d9f8864b2d41930940acc38de987045a ("batman-adv: don't print the last_seen time for bat0 TT local entry") Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: update copyright yearsAntonio Quartulli2013-01-191-1/+1
| | | | | Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: a delayed_work has to be initialised onceAntonio Quartulli2013-01-191-9/+5Star
| | | | | | | | | | A delayed_work struct does not need to be initialized each every time before being enqueued. Therefore the INIT_DELAYED_WORK() macro should be used during the initialization process only. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: remove useless blank lines before and after bracketsAntonio Quartulli2013-01-121-7/+0Star
| | | | | Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Initialize lockdep class keys for hashesAntonio Quartulli2013-01-121-0/+10
| | | | | | | | | | | | | Different hashes have the same class key because they get initialised with the same one. For this reason lockdep can create false warning when they are used recursively. Re-initialise the key for each hash after the invocation to hash_new() to avoid this problem. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Tested-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: remove useless assignment in tt_local_add()Antonio Quartulli2013-01-121-7/+5Star
| | | | | | | | | | | | | The flag field of the tt_local_entry->common structure in tt_local_add() is first assigned NO_FLAGS and then TT_CLIENT_NEW so nullifying the first operation. For this reason it is safe to remove the first assignment. This was introuduced by ("batman-adv: keep local table consistency for further TT_RESPONSE") Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: unify and properly print hex valuesAntonio Quartulli2013-01-121-1/+1
| | | | | | | | | | | | | | Values are printed in hexadecimal format in several points in the code, but they are not printed using the same format string. This patches unifies the format used for such numbers so that they look the same everywhere. Given the fact that all the variables printed as hexadecimal are 16 bit long, this is the chosen printing format: %#.4x Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: print the CRC together with the translation tablesAntonio Quartulli2013-01-121-6/+9
| | | | | | | | | To simplify debugging operations, it is better to print the related CRC together with the translation table (local CRC for the local table and global CRC for each entry in the global table) Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: improve local translation table outputAntonio Quartulli2013-01-121-4/+23
| | | | | | | | This patch adds a nice header to the local translation table and the last_seen time for each local entry Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Add wrapper to look up neighbor and send skbMartin Hundebøll2012-11-211-48/+17Star
| | | | | | | | | | | | | | | | | | | By adding batadv_send_skb_to_orig() in send.c, we can remove duplicate code that looks up the next hop and then calls batadv_send_skb_packet(). Furthermore, this prepares the upcoming new implementation of fragmentation, which requires the next hop to route packets. Please note that this doesn't entirely remove the next-hop lookup in routing.c and unicast.c, since it is used by the current fragmentation code. Also note that the next-hop info is removed from debug messages in translation-table.c, since it is looked up elsewhere. Signed-off-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: Mark best gateway in transtable_global debugfsSven Eckelmann2012-11-211-26/+64
| | | | | | | | | | | | | | The transtable_global debug file can show multiple entries for a single client when multiple gateways exist. The chosen gateway isn't marked in the list and therefore the user cannot easily debug the situation when there is a problem with the currently used gateway. The best gateway is now marked with "*" and secondary gateways are marked with "+". Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2012-11-181-1/+14
|\ | | | | | | | | | | Minor line offset auto-merges. Signed-off-by: David S. Miller <davem@davemloft.net>
| * batman-adv: don't add TEMP clients belonging to other backbone nodesAntonio Quartulli2012-11-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The "early client detection" mechanism must not add clients belonging to other backbone nodes. Such clients must be reached by directly using the LAN instead of the mesh. This was introduced by 30cfd02b60e1cb16f5effb0a01f826c5bb7e4c59 ("batman-adv: detect not yet announced clients") Reported-by: Glen Page <glen.page@thet.net> Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
| * batman-adv: correctly pass the client flag on tt_responseAntonio Quartulli2012-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When a TT response with the full table is sent, the client flags should be sent as well. This patch fix the flags assignment when populating the tt_response to send back This was introduced by 30cfd02b60e1cb16f5effb0a01f826c5bb7e4c59 ("batman-adv: detect not yet announced clients") Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
| * batman-adv: fix tt_global_entries flags updateAntonio Quartulli2012-11-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flags carried by a change_entry have to be always copied into the client entry as they may contain important attributes (e.g. TT_CLIENT_WIFI). For instance, a client added by means of the "early detection mechanism" has no flag set at the beginning, so they must be updated once the proper ADD event is received. This was introduced by 30cfd02b60e1cb16f5effb0a01f826c5bb7e4c59 ("batman-adv: detect not yet announced clients") Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* | batman-adv: Remove instant overwritten variable initializationSven Eckelmann2012-11-141-10/+10
| | | | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: roaming handling mechanism redesignAntonio Quartulli2012-11-141-39/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows clients to roam multiple times within the same originator-interval. To enable this new feature two key aspects that have been introduced: 1) packets are always directed to the node that was originally serving the roamed client which will then re-route the data to the correct destination at any point in time; 2) the client flags handling mechanism has been properly modified in order to allow multiple roamings withinin the same orig-int. Therefore flags are now set properly even in this scenario. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: refactor tt_global_del_struct()Antonio Quartulli2012-11-141-10/+9Star
| | | | | | | | | | | | | | | | | | | | | | batadv_tt_global_del_struct() function is not properly named. Having a more meaningful name which reflects the current behavior helps other developers to easily understand what it does. A parameter has also been renamed in order to let the function header better fit the 80-chars line-width Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: refactor code to simplify long linesAntonio Quartulli2012-11-141-32/+30Star
| | | | | | | | Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: substitute tt_poss_change with a per-tt_entry flagAntonio Quartulli2012-11-141-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tt_poss_change is a node-wide flag which tells whether the node is in a roaming state (a client recently moved to/away from it) in order to let it apply special re-routing rules. However this flag does not give a clear idea of the current state because it is not possible to understand *which client* is actually involved in the roaming. For this reason a better approach has been chosen: instead of using a node-wide variable, the roaming state is now given by a per-tt_entry ROAM flag which, in case of packet coming through the node, tells the node whether the real destination is in roaming state or not. With this flag change, batadv_check_unicast_ttvn() has also been rearranged in order to better fit the new re-routing logic and to be much more readable. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: Reserve extra bytes in skb for better alignmentSven Eckelmann2012-11-071-10/+10
| | | | | | | | | | | | | | | | | | | | | | The ethernet header is 14 bytes long. Therefore, the data after it is not 4 byte aligned and may cause problems on systems without unaligned data access. Reserving NET_IP_ALIGN more byes can fix the misalignment of the ethernet header. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: pass the WIFI flag from the local to global entryAntonio Quartulli2012-10-291-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in case of client roaming a new global entry is added while a corresponding local one is still present. In this case the node can safely pass the WIFI flag from the local to the global entry. This change is required to let the AP-isolation correctly working in case of roaming: if a generic WIFI client C roams from node A to B, A adds a global entry for C without adding any WIFI flag. The latter will be set only later, once A has received C's advertisement from B. In this time period the AP-Isolation (if enabled) would not correctly work since C is not marked as WIFI, so allowing it to communicate with other WIFI clients. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: properly convert flag into a boolean valueAntonio Quartulli2012-10-291-1/+1
| | | | | | | | | | | | | | In order to properly convert a bitwise AND to a boolean value, the whole expression must be prepended by "!!". Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: properly store the roaming timeAntonio Quartulli2012-10-291-0/+6
| | | | | | | | | | | | | | | | | | | | in case of a new global entry added because of roaming, the roam_at field must be properly initiated with the current time. This value will be later use to purge this entry out on time out (if nobody claims it). Instead roam_at field is now set to zero in this situation leading to an immediate purging of the related entry. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: return proper value in case of hash_add failureAntonio Quartulli2012-10-291-1/+1
| | | | | | | | | | | | | | In case of hash_add failure tt_global_add() must return 0 (which means on entry insertion). Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: consolidate duplicated primary_if checking codeMarek Lindner2012-10-291-30/+6Star
|/ | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: detect not yet announced clientsAntonio Quartulli2012-08-231-32/+95
| | | | | | | | | | | | | | | | | | | | With the current TT mechanism a new client joining the network is not immediately able to communicate with other hosts because its MAC address has not been announced yet. This situation holds until the first OGM containing its joining event will be spread over the mesh network. This behaviour can be acceptable in networks where the originator interval is a small value (e.g. 1sec) but if that value is set to an higher time (e.g. 5secs) the client could suffer from several malfunctions like DHCP client timeouts, etc. This patch adds an early detection mechanism that makes nodes in the network able to recognise "not yet announced clients" by means of the broadcast packets they emitted on connection (e.g. ARP or DHCP request). The added client will then be confirmed upon receiving the OGM claiming it or purged if such OGM is not received within a fixed amount of time. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: Reduce accumulated length of simple statementsSven Eckelmann2012-08-231-4/+6
| | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: Split batadv_priv in sub-structures for featuresSven Eckelmann2012-08-231-103/+105
| | | | | | | | | | | | | | 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 <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: add reference counting for type batadv_tt_orig_list_entryAntonio Quartulli2012-08-231-23/+52
| | | | | | | | The batadv_tt_orig_list_entry structure didn't have any refcounting mechanism so far. This patch introduces it and makes the structure being usable in much more complex context. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: Fix mem leak in the batadv_tt_local_event() functionJesper Juhl2012-08-091-0/+1
| | | | | | | | | | | Memory is allocated for 'tt_change_node' with kmalloc(). 'tt_change_node' may go out of scope really being used for anything (except have a few members initialized) if we hit the 'del:' label. This patch makes sure we free the memory in that case. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* batman-adv: Don't leak information through uninitialized packet fieldsSven Eckelmann2012-07-011-0/+1
| | | | | | | | | | 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 <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: Prefix types structs with batadv_Sven Eckelmann2012-07-011-215/+231
| | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Prefix packet structs with batadv_Sven Eckelmann2012-07-011-54/+65
| | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Prefix hash struct and typedef with batadv_Sven Eckelmann2012-07-011-15/+15
| | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Prefix main enum with BATADV_Sven Eckelmann2012-07-011-17/+18
| | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Prefix packet enum with BATADV_Sven Eckelmann2012-07-011-93/+98
| | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Prefix types enum with BATADV_Sven Eckelmann2012-07-011-4/+4
| | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Prefix hard-interface enum with BATADV_Sven Eckelmann2012-07-011-2/+2
| | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Prefix main defines with BATADV_Sven Eckelmann2012-06-281-37/+50
| | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Prefix packet defines with BATADV_Sven Eckelmann2012-06-281-4/+4
| | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: beautify tt_global_add() argument listAntonio Quartulli2012-06-281-15/+9Star
| | | | | | | | Instead of adding a new bool argument each time it is needed, it is better (and simpler) to pass an 8bit flag argument which contains all the needed flags Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: clear ADD+DEL (and viceversa) events in the same orig-intervalAntonio Quartulli2012-06-281-3/+37
| | | | | | | | | | | | | | During an OGM-interval (time between two different OGM sendings) the same client could roam away and then roam back to us. In this case the node would add two events to the events list (that is going to be sent appended to the next OGM). A DEL one and an ADD one. Obviously they will only increase the overhead (either in the air and on the receiver side) and eventually trigger wrong states/events without producing any real effect. For this reason we can safely delete any ADD event with its related DEL one. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Prefix remaining function like macros with batadv_Sven Eckelmann2012-06-281-2/+2
| | | | Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: fix global TT entry deletionAntonio Quartulli2012-06-261-0/+2
| | | | | | | | During the last merge involving translation-table.c something went wrong and two lines disappeared from translation-table.c. This patch recovers them. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: David S. Miller <davem@davemloft.net>