summaryrefslogtreecommitdiffstats
path: root/net/batman-adv
Commit message (Collapse)AuthorAgeFilesLines
* batman-adv: Fix symmetry check / route flapping in multi interface setupsLinus Lüssing2012-09-231-6/+7
| | | | | | | | | | | | | | | | | | | | | If receiving an OGM from a neighbor other than the currently selected and if it has the same TQ then we are supposed to switch if this neighbor provides a more symmetric link than the currently selected one. However this symmetry check currently is broken if the interface of the neighbor we received the OGM from and the one of the currently selected neighbor differ: We are currently trying to determine the symmetry of the link towards the selected router via the link we received the OGM from instead of just checking via the link towards the currently selected router. This leads to way more route switches than necessary and can lead to permanent route flapping in many common multi interface setups. This patch fixes this issue by using the right interface for this symmetry check. Signed-off-by: Linus Lüssing <linus.luessing@web.de>
* batman-adv: Fix change mac address of soft iface.Def2012-09-231-2/+5
| | | | | | | | Into function interface_set_mac_addr, the function tt_local_add was invoked before updating dev->dev_addr. The new MAC address was not tagged as NoPurge. Signed-off-by: Def <def@laposte.net>
* batman-adv: make batadv_test_bit() return 0 or 1 onlyLinus Lüssing2012-09-191-3/+3
| | | | | | | | | | | | | | | | On some architectures test_bit() can return other values than 0 or 1: With a generic x86 OpenWrt image in a kvm setup (batadv_)test_bit() frequently returns -1 for me, leading to batadv_iv_ogm_update_seqnos() wrongly signaling a protected seqno window. This patch tries to fix this issue by making batadv_test_bit() return 0 or 1 only. Signed-off-by: Linus Lüssing <linus.luessing@web.de> Acked-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* batman-adv: Fix mem leak in the batadv_tt_local_event() functionJesper Juhl2012-08-081-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: select an internet gateway if none was chosenMarek Lindner2012-08-061-3/+3
| | | | | | | | | | | This is a regression introduced by: 2265c141086474bbae55a5bb3afa1ebb78ccaa7c ("batman-adv: gateway election code refactoring") Reported-by: Nicolás Echániz <nicoechaniz@codigosur.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2012-07-103-7/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: net/batman-adv/bridge_loop_avoidance.c net/batman-adv/bridge_loop_avoidance.h net/batman-adv/soft-interface.c net/mac80211/mlme.c With merge help from Antonio Quartulli (batman-adv) and Stephen Rothwell (drivers/net/usb/qmi_wwan.c). The net/mac80211/mlme.c conflict seemed easy enough, accounting for a conversion to some new tracing macros. Signed-off-by: David S. Miller <davem@davemloft.net>
| * batman-adv: check incoming packet type for blaSimon Wunderlich2012-07-063-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the gateway functionality is used, some broadcast packets (DHCP requests) may be transmitted as unicast packets. As the bridge loop avoidance code now only considers the payload Ethernet destination, it may drop the DHCP request for clients which are claimed by other backbone gateways, because it falsely infers from the broadcast address that the right backbone gateway should havehandled the broadcast. Fix this by checking and delegating the batman-adv packet type used for transmission. Reported-by: Guido Iribarren <guidoiribarren@buenosaireslibre.org> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
* | net: Fix (nearly-)kernel-doc comments for various functionsBen Hutchings2012-07-104-20/+40
| | | | | | | | | | | | | | | | Fix incorrect start markers, wrapped summary lines, missing section breaks, incorrect separators, and some name mismatches. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | batman-adv: Don't leak information through uninitialized packet fieldsSven Eckelmann2012-07-013-0/+4
| | | | | | | | | | | | | | | | | | | | 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: fix counter summary lengthMarek Lindner2012-07-011-2/+1
| | | | | | | | | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: Fix alignment after opened parenthesesSven Eckelmann2012-07-015-19/+24
| | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: Remove space before semicolonSven Eckelmann2012-07-011-1/+1
| | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: Remove bat_ prefix from bat_{debugfs, sysfs}.{c, h}Sven Eckelmann2012-07-019-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | The "bat_" prefix in the source files implementing the batman-adv sysfs and debugfs interface doesn't have a special meaning and are only used by these files and files that implement the actual B.A.T.M.A.N. path finding algorithm. The prefix is better suited to mark files that are used to implement the main part of the path finding. All other files should not use it and therefore gets renamed. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Transform BATADV_LOG_BUFF(idx) into functionSven Eckelmann2012-07-011-4/+15
| | | | | | | | | | | | | | | | | | The linux Documentation/CodingStyle says that: * Chapter 12: "inline functions are preferable to macros resembling functions" * Chapter 12.2: Depending on local variables with a magic name is bad * Chapter 12.3: Macros with arguments used as l-value are bad Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix types structs with batadv_Sven Eckelmann2012-07-0131-938/+1029
| | | | | | | | | | 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-0119-347/+369
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix local sysfs struct with batadv_Sven Eckelmann2012-07-012-7/+7
| | | | | | | | | | 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-019-64/+67
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix local debugfs structs with batadv_Sven Eckelmann2012-07-011-5/+5
| | | | | | | | | | 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-0114-135/+140
| | | | | | | | | | 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-0112-232/+254
| | | | | | | | | | 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-015-31/+31
| | | | | | | | | | 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-0113-63/+68
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix gateway enum with BATADV_Sven Eckelmann2012-07-015-22/+22
| | | | | | | | | | 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-2818-202/+244
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix vis defines with BATADV_Sven Eckelmann2012-06-282-2/+2
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix unicast defines with BATADV_Sven Eckelmann2012-06-283-4/+4
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix types defines with BATADV_Sven Eckelmann2012-06-283-11/+11
| | | | | | | | | | 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-2811-37/+40
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix icmp_socket defines with BATADV_Sven Eckelmann2012-06-282-2/+2
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix gateway defines with BATADV_Sven Eckelmann2012-06-282-14/+18
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix bridge_loop_avoidance defines with BATADV_Sven Eckelmann2012-06-282-3/+3
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix sysfs defines with BATADV_Sven Eckelmann2012-06-282-9/+9
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix debugfs defines with BATADV_Sven Eckelmann2012-06-282-2/+2
| | | | | | | | | | Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix local defines with BATADV_Sven Eckelmann2012-06-284-81/+87
| | | | | | | | | | 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-283-19/+13
| | | | | | | | | | | | | | | | 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: Directly print to seq_file in visSven Eckelmann2012-06-281-143/+81
| | | | | | | | | | | | | | 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 <sven@narfation.org>
* | batman-adv: Prefix remaining function like macros with batadv_Sven Eckelmann2012-06-2811-89/+98
| | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: Prefix main local static functions with batadv_Sven Eckelmann2012-06-281-37/+39
| | | | | | | | | | | | | | | | 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 <sven@narfation.org>
* | batman-adv: Prefix vis local static functions with batadv_Sven Eckelmann2012-06-281-98/+103
| | | | | | | | | | | | | | | | 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 <sven@narfation.org>
* | batman-adv: Prefix unicast local static functions with batadv_Sven Eckelmann2012-06-281-13/+16
| | | | | | | | | | | | | | | | 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 <sven@narfation.org>
* | batman-adv: fix global TT entry deletionAntonio Quartulli2012-06-251-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>
* | batman-adv: fix condition in AP isolationAntonio Quartulli2012-06-251-1/+1
| | | | | | | | | | | | | | | | | | During the last conflict resolution involving translation-table.c something went wrong and a condition in the AP isolation code was reversed. This patch fixes this problem. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-mergeDavid S. Miller2012-06-2524-1482/+1591
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Included changes: - yet another batch of 'namespace cleaning' patches Conflicts: net/batman-adv/translation-table.c Signed-off-by: David S. Miller <davem@davemloft.net>
| * | batman-adv: Prefix translation-table local static functions with batadv_Sven Eckelmann2012-06-251-258/+282
| | | | | | | | | | | | | | | | | | | | | | | | 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 <sven@narfation.org>
| * | batman-adv: Prefix soft-interface local static functions with batadv_Sven Eckelmann2012-06-251-39/+41
| | | | | | | | | | | | | | | | | | | | | | | | 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 <sven@narfation.org>
| * | batman-adv: Prefix send local static functions with batadv_Sven Eckelmann2012-06-251-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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 <sven@narfation.org>
| * | batman-adv: Prefix routing local static functions with batadv_Sven Eckelmann2012-06-251-31/+34
| | | | | | | | | | | | | | | | | | | | | | | | 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 <sven@narfation.org>
| * | batman-adv: Prefix originator local static functions with batadv_Sven Eckelmann2012-06-251-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | 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 <sven@narfation.org>
OpenPOWER on IntegriCloud