summaryrefslogtreecommitdiffstats
path: root/net/batman-adv
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2012-09-283-7/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/team/team.c drivers/net/usb/qmi_wwan.c net/batman-adv/bat_iv_ogm.c net/ipv4/fib_frontend.c net/ipv4/route.c net/l2tp/l2tp_netlink.c The team, fib_frontend, route, and l2tp_netlink conflicts were simply overlapping changes. qmi_wwan and bat_iv_ogm were of the "use HEAD" variety. With help from Antonio Quartulli. Signed-off-by: David S. Miller <davem@davemloft.net>
| * 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: Start new development cycleSven Eckelmann2012-08-231-1/+1
| | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: change interface_rx to get orig nodeAntonio Quartulli2012-08-233-7/+14
| | | | | | | | | | | | | | | | | | | | | | In order to understand where a broadcast packet is coming from and use this information to detect not yet announced clients, this patch modifies the interface_rx() function by passing a new argument: the orig node corresponding to the node that originated the received packet (if known). This new argument if not NULL for broadcast packets only (other packets does not have source field). Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: detect not yet announced clientsAntonio Quartulli2012-08-235-33/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-237-38/+55
| | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: Don't break statements after assignment operatorSven Eckelmann2012-08-236-35/+39
| | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: Use BIT(x) macro to calculate bit positionsSven Eckelmann2012-08-233-29/+31
| | | | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: Drop tt queries with foreign destMartin Hundebøll2012-08-231-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | When enabling promiscuous mode, tt queries for other hosts might be received. Before this patch, "foreign" tt queries were processed like any other query and thus forwarded to its destination again and thereby causing a loop. This patch adds a check to drop foreign tt queries. Signed-off-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: Move batadv_check_unicast_packet()Martin Hundebøll2012-08-231-25/+25
| | | | | | | | | | | | | | | | batadv_check_unicast_packet() is needed in batadv_recv_tt_query(), so move the former to before the latter. Signed-off-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: Split batadv_priv in sub-structures for featuresSven Eckelmann2012-08-2310-311/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: check batadv_orig_hash_add_if() return codeSimon Wunderlich2012-08-231-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If this call fails, some of the orig_nodes spaces may have been resized for the increased number of interface, and some may not. If we would just continue with the larger number of interfaces, this would lead to access to not allocated memory later. We better check the return code, and don't add the interface if no memory is available. OTOH, keeping some of the orig_nodes with too much memory allocated should hurt no one (except for a few too many bytes allocated). Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: fix typos in commentsAntonio Quartulli2012-08-232-5/+5
| | | | | | | | | | | | the word millisecond is misspelled in several comments. This patch fixes it. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: add reference counting for type batadv_tt_orig_list_entryAntonio Quartulli2012-08-232-23/+53
| | | | | | | | | | | | | | | | 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: remove a misleading commentJonathan Corbet2012-08-231-3/+0
| | | | | | | | | | | | | | | | | | As much as I'm happy to see LWN links sprinkled through the kernel by the dozen, this one in particular reflects a very old state of reality; the associated comment is now incorrect. So just delete it. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: convert remaining packet counters to per_cpu_ptr() infrastructureMarek Lindner2012-08-233-19/+42
| | | | | | | | | | | | 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: rename bridge loop avoidance claim typesSimon Wunderlich2012-08-232-11/+11
| | | | | | | | | | | | | | | | for consistency reasons within the code and with the documentation, we should always call it "claim" and "unclaim". Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: correct comments in bridge loop avoidanceSimon Wunderlich2012-08-231-2/+3
| | | | | | | | | | Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: Add the backbone gateway list to debugfsSimon Wunderlich2012-08-233-0/+85
| | | | | | | | | | | | | | | | This is especially useful if there are no claims yet, but we still want to know which gateways are using bridge loop avoidance in the network. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* | batman-adv: move function arguments on one lineAntonio Quartulli2012-08-231-2/+1
|/ | | | Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* 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>
OpenPOWER on IntegriCloud