The branch, test has been created at 03f4425e0031c14ad2a20f91f8609c7da718fbcc (commit)
- Shortlog ------------------------------------------------------------ commit 03f4425e0031c14ad2a20f91f8609c7da718fbcc Merge: 52dfeed 0ebccb4 Author: Antonio Quartulli a@unstable.cc Date: Sat Jan 16 20:33:24 2016 +0800
Merge remote-tracking branch 'pkg/next' into merge/master
Signed-off-by: Antonio Quartulli a@unstable.cc
commit 0ebccb4e8e904c8db24d8f44a2368278b45c7111 Author: Sven Eckelmann sven@narfation.org Date: Tue Jan 5 12:06:26 2016 +0100
batman-adv: Drop reference to netdevice on last reference
The references to the network device should be dropped inside the release function for batadv_hard_iface similar to what is done with the batman-adv internal datastructures.
Fixes: b25cb3ddcccd ("batman-adv: use rcu callbacks when freeing batman_if") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 88a7a4ed0b5898315c255ee0cc271686ae2c0ec2 Author: Sven Eckelmann sven@narfation.org Date: Tue Jan 5 12:06:25 2016 +0100
batman-adv: Drop immediate batadv_hard_iface free function
It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore.
But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_hardif_free_ref.
Fixes: 9bb33b8d88e3 ("batman-adv: split tq information in neigh_node struct") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 26f0de295a68a4e3c00cd8630841a8ddfdfb3475 Author: Sven Eckelmann sven@narfation.org Date: Tue Jan 5 12:06:24 2016 +0100
batman-adv: Drop immediate neigh_ifinfo free function
It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore.
But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_neigh_ifinfo_free_ref.
Fixes: 9bb33b8d88e3 ("batman-adv: split tq information in neigh_node struct") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit b964cfb9fd7a931df8665d7a3b8e035cc336d522 Author: Sven Eckelmann sven@narfation.org Date: Tue Jan 5 12:06:23 2016 +0100
batman-adv: Drop immediate batadv_hardif_neigh_node free function
It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore.
But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_hardif_neigh_free_ref.
Fixes: fed2826b490c ("batman-adv: add list of unique single hop neighbors per hard-interface") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit b28b2011532a42bffa5f67185fb7c2465f2419bb Author: Sven Eckelmann sven@narfation.org Date: Tue Jan 5 12:06:22 2016 +0100
batman-adv: Drop immediate batadv_neigh_node free function
It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore.
But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_neigh_node_free_ref.
Fixes: 9bb33b8d88e3 ("batman-adv: split tq information in neigh_node struct") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit cc18487b990af0aea28ae3214e011527c1858c99 Author: Sven Eckelmann sven@narfation.org Date: Tue Jan 5 12:06:21 2016 +0100
batman-adv: Drop immediate batadv_orig_ifinfo free function
It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore.
But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_orig_ifinfo_free_ref.
Fixes: de6bcc76ea84 ("batman-adv: split out router from orig_node") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 648d2a941db23d14a65ea47ecc2e6840417f405d Author: Sven Eckelmann sven@narfation.org Date: Tue Jan 5 12:06:20 2016 +0100
batman-adv: Drop immediate orig_node free function
It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore.
But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_orig_node_free_ref.
Fixes: c8bda218468a ("batman-adv: Fix rcu_barrier() miss due to double call_rcu() in TT code") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 7fb1c89b1035c464be657528765e698cc21fafb1 Author: Sven Eckelmann sven@narfation.org Date: Tue Jan 5 12:06:19 2016 +0100
batman-adv: Avoid recursive call_rcu for batadv_nc_node
The batadv_nc_node_free_ref function uses call_rcu to delay the free of the batadv_nc_node object until no (already started) rcu_read_lock is enabled anymore. This makes sure that no context is still trying to access the object which should be removed. But batadv_nc_node also contains a reference to orig_node which must be removed.
The reference drop of orig_node was done in the call_rcu function batadv_nc_node_free_rcu but should actually be done in the batadv_nc_node_release function to avoid nested call_rcus. This is important because rcu_barrier (e.g. batadv_softif_free or batadv_exit) will not detect the inner call_rcu as relevant for its execution. Otherwise this barrier will most likely be inserted in the queue before the callback of the first call_rcu was executed. The caller of rcu_barrier will therefore continue to run before the inner call_rcu callback finished.
Fixes: 3ed7ada3f0bb ("batman-adv: network coding - detect coding nodes and remove these after timeout") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2783bc2a5ac88e0f7cefa71c324bd86c542d4ae5 Author: Sven Eckelmann sven@narfation.org Date: Thu Jan 14 15:28:19 2016 +0100
batman-adv: Avoid recursive call_rcu for batadv_bla_claim
The batadv_claim_free_ref function uses call_rcu to delay the free of the batadv_bla_claim object until no (already started) rcu_read_lock is enabled anymore. This makes sure that no context is still trying to access the object which should be removed. But batadv_bla_claim also contains a reference to backbone_gw which must be removed.
The reference drop of backbone_gw was done in the call_rcu function batadv_claim_free_rcu but should actually be done in the batadv_claim_release function to avoid nested call_rcus. This is important because rcu_barrier (e.g. batadv_softif_free or batadv_exit) will not detect the inner call_rcu as relevant for its execution. Otherwise this barrier will most likely be inserted in the queue before the callback of the first call_rcu was executed. The caller of rcu_barrier will therefore continue to run before the inner call_rcu callback finished.
Fixes: a9ce0dc43e2c ("batman-adv: add basic bridge loop avoidance code") Signed-off-by: Sven Eckelmann sven@narfation.org Acked-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 52dfeed92e7594e01ccccaea4efa7280c2b41b58 Merge: d443dc8 6219a1b Author: Antonio Quartulli a@unstable.cc Date: Thu Jan 7 21:47:25 2016 +0800
Merge remote-tracking branch 'pkg/next' into merge/master
commit d443dc86188ab38100f5d4220ffaef1efbcb7377 Author: Sven Eckelmann sven@narfation.org Date: Sun Nov 29 01:48:57 2015 +0100
batman-adv: Fix invalid read while copying bat_iv.bcast_own
batadv_iv_ogm_orig_del_if removes a part of the bcast_own which previously belonged to the now removed interface. This is done by copying all data which comes before the removed interface and then appending all the data which comes after the removed interface.
The address calculation for the position of the data which comes after the removed interface assumed that the bat_iv.bcast_own is a pointer to a single byte datatype. But it is a pointer to unsigned long and thus the calculated position was wrong off factor sizeof(unsigned long).
Fixes: 83a8342678a0 ("more basic routing code added (forwarding packets / bitarray added)")
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6219a1b400d38fbdce22ba252e68bc883b32c73c Author: Sven Eckelmann sven@narfation.org Date: Tue Jan 5 12:06:17 2016 +0100
batman-adv: Fix list removal of batadv_hardif_neigh_node
The neigh_list with batadv_hardif_neigh_node objects is accessed with only rcu_read_lock in batadv_hardif_neigh_get and batadv_iv_neigh_print. Thus it is not allowed to kfree the object before the rcu grace period ends (which may still protects context accessing this object). Therefore the object has first to be removed from the neigh_list and then it has either wait with synchronize_rcu or call_rcu till the grace period ends before it can be freed.
Fixes: fed2826b490c ("batman-adv: add list of unique single hop neighbors per hard-interface") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 025b743f6474bfdcd765a16ec6b098d06a40bf87 Author: Simon Wunderlich simon@open-mesh.com Date: Mon Nov 30 17:34:01 2015 +0100
batman-adv: fix lockdep splat when doing mcast_free
While testing, we got something like this:
WARNING: CPU: 0 PID: 238 at net/batman-adv/multicast.c:142 batadv_mcast_mla_tt_retract+0x94/0x205 [batman_adv]() [...] Call Trace: [<ffffffff815fc597>] dump_stack+0x4b/0x64 [<ffffffff810b34dc>] warn_slowpath_common+0xbc/0x120 [<ffffffffa0024ec5>] ? batadv_mcast_mla_tt_retract+0x94/0x205 [batman_adv] [<ffffffff810b3705>] warn_slowpath_null+0x15/0x20 [<ffffffffa0024ec5>] batadv_mcast_mla_tt_retract+0x94/0x205 [batman_adv] [<ffffffffa00273fe>] batadv_mcast_free+0x36/0x39 [batman_adv] [<ffffffffa0020c77>] batadv_mesh_free+0x7d/0x13f [batman_adv] [<ffffffffa0036a6b>] batadv_softif_free+0x15/0x25 [batman_adv] [...]
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 57f7452727a99fb4bf8edb402f3ef2c78c1da568 Merge: 0e92483 cee1039 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Dec 30 19:48:46 2015 +0800
Merge branch 'maint' into next
commit cee103946bb05db00e351cf8b5dee9c8aed8d5f8 Author: Sven Eckelmann sven@narfation.org Date: Sun Nov 29 01:48:57 2015 +0100
batman-adv: Fix invalid read while copying bat_iv.bcast_own
batadv_iv_ogm_orig_del_if removes a part of the bcast_own which previously belonged to the now removed interface. This is done by copying all data which comes before the removed interface and then appending all the data which comes after the removed interface.
The address calculation for the position of the data which comes after the removed interface assumed that the bat_iv.bcast_own is a pointer to a single byte datatype. But it is a pointer to unsigned long and thus the calculated position was wrong off factor sizeof(unsigned long).
Fixes: 83a8342678a0 ("more basic routing code added (forwarding packets / bitarray added)")
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 0e924832449a79324608fca2b311d142f25106b3 Author: Antonio Quartulli antonio@meshcoding.com Date: Thu Dec 17 00:20:32 2015 +0100
batman-adv: update email address
My personal email address has changed. Update it in the doc files
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 84e11bed303d18950cdffae44e9a61423eb344c3 Author: Sven Eckelmann sven@narfation.org Date: Mon Dec 14 09:48:31 2015 +0100
batman-adv: Fix build with linux < 3.9.0
netdev_master_upper_dev_link already had a compat layer definition for linux < 3.9. Move these two different definitions to the same block to avoid using redefinitions which can break the build.
Fixes: e19f387b9538 ("batman-adv: add possibility to pass information about upper device via notifier") Fixes: d794c1cd9d4f ("batman-adv: propagate upper priv via netdev_master_upper_dev_link") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 399bf29c6a307fdcc835a8b7262bce56df71f977 Author: Andrew Lunn andrew@lunn.ch Date: Tue Dec 8 21:35:58 2015 +0100
batman-adv: Act on NETDEV_*_TYPE_CHANGE events
A network interface can change type. It may change from a type which batman does not support, e.g. hdlc, to one it does, e.g. hdlc-eth. When an interface changes type, it sends two notifications. Handle these notifications.
Signed-off-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e19f387b9538a65eb260d3182e0352d259e150c1 Author: Jiri Pirko jiri@mellanox.com Date: Tue Dec 8 21:35:14 2015 +0100
batman-adv: add possibility to pass information about upper device via notifier
Sometimes the drivers and other code would find it handy to know some internal information about upper device being changed. So allow upper-code to pass information down to notifier listeners during linking.
Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d794c1cd9d4f9101d135cc7bfd8ff37604bc06f3 Author: Jiri Pirko jiri@mellanox.com Date: Tue Dec 8 21:35:13 2015 +0100
batman-adv: propagate upper priv via netdev_master_upper_dev_link
Eliminate netdev_master_upper_dev_link_private and pass priv directly as a parameter of netdev_master_upper_dev_link.
Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2f44c0941e32d269c3c8c2ff30483e59e62b9b7f Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Dec 7 23:21:01 2015 +0800
Doc: update email address
My personal email address has changed. Update it in the doc files
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
commit 3f3eb76fd8033e698457c2c6bc651dc3953ee065 Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Dec 7 23:19:02 2015 +0800
MAINTAINERS: update email address
My personal email address has changed. Update it in the MAINTAINERS file
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
commit 2ff2f27d31d791b6065088376330a20e4a2fdefe Merge: 97345ad bce19ab Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Dec 7 23:15:30 2015 +0800
Merge remote-tracking branch 'pkg/next' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
commit 97345ad4c09d73e5893ce0d87e6562ef0daa5e84 Author: Sven Eckelmann sven@narfation.org Date: Wed Nov 18 09:41:41 2015 +0100
batman-adv: Fix variable declaration warning in batadv_compare_tt
checkpatch is warning about the wrong way a pointer is declared in batadv_compare_tt.
ERROR: "foo* bar" should be "foo *bar" #80: FILE: ./net/batman-adv/translation-table.c:80: + const struct batadv_tt_common_entry* tt1 = data1;
Fixes: af5fa950cbb6 ("batman-adv: fix erroneous client entry duplicate detection") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit bde0e67b8f3278f7b2e26ce9606d9820446c9e32 Author: Sven Eckelmann sven@open-mesh.com Date: Tue Nov 3 10:05:44 2015 +0100
batman-adv: Fix invalid stack access in batadv_dat_select_candidates
batadv_dat_select_candidates provides an u32 to batadv_hash_dat but it needs a batadv_dat_entry with at least ip and vid filled in.
Fixes: 3e26722bc9f2 ("batman-adv: make the Distributed ARP Table vlan aware") Signed-off-by: Sven Eckelmann sven@open-mesh.com Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f3692eb3f642e405da352f7ef0152d722102fdb0 Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Aug 6 10:38:54 2015 +0200
batman-adv: fix erroneous client entry duplicate detection
The translation table implementation, namely batadv_compare_tt(), is used to compare two client entries and deciding if they are the holding the same information. Each client entry is identified by its mac address and its VLAN id (VID). Consequently, batadv_compare_tt() has to not only compare the mac addresses but also the VIDs.
Without this fix adding a new client entry that possesses the same mac address as another client but operates on a different VID will fail because both client entries will considered identical.
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit afb6a6166b053c26bbee0749fe3506f51d163143 Author: Simon Wunderlich sw@simonwunderlich.de Date: Fri Sep 11 18:04:13 2015 +0200
batman-adv: lock crc access in bridge loop avoidance
We have found some networks in which nodes were constantly requesting other nodes BLA claim tables to synchronize, just to ask for that again once completed. The reason was that the crc checksum of the asked nodes were out of sync due to missing locking and multiple writes to the same crc checksum when adding/removing entries. Therefore the asked nodes constantly reported the wrong crc, which caused repeating requests.
To avoid multiple functions changing a backbone gateways crc entry at the same time, lock it using a spinlock.
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Tested-by: Alfons Name AlfonsName@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d2d3ef66ec8e6de664ceebcb7db80ad311f8d5f5 Author: Simon Wunderlich sw@simonwunderlich.de Date: Wed Sep 2 20:09:56 2015 +0200
batman-adv: detect local excess vlans in TT request
If the local representation of the global TT table of one originator has more VLAN entries than the respective TT update, there is some inconsistency present. By detecting and reporting this inconsistency, the global table gets updated and the excess VLAN will get removed in the process.
Reported-by: Alessandro Bolletta alessandro@mediaspot.net Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d4a4b323b3beb1c9bf31fbc36be164924f93706c Author: Simon Wunderlich sw@simonwunderlich.de Date: Wed Sep 2 20:09:55 2015 +0200
batman-adv: avoid keeping false temporary entry
In the case when a temporary entry is added first and a proper tt entry is added after that, the temporary tt entry is kept in the orig list. However the temporary flag is removed at this point, and therefore the purge function can not find this temporary entry anymore.
Therefore, remove the previous temp entry before adding the new proper one.
This case can happen if a client behind a given originator moves before the TT announcement is sent out. Other than that, this case can also be created by bogus or malicious payload frames for VLANs which are not existent on the sending originator.
Reported-by: Alessandro Bolletta alessandro@mediaspot.net Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c60f8399dd5f5f7a73777ea68422baa480561b5d Author: Simon Wunderlich sw@simonwunderlich.de Date: Wed Sep 2 20:09:54 2015 +0200
batman-adv: fix speedy join for DAT cache replies
DAT Cache replies are answered on behalf of other clients which are not connected to the answering originator. Therefore, we shouldn't add these clients to the answering originators TT table through speed join to avoid bogus entries.
Reported-by: Alessandro Bolletta alessandro@mediaspot.net Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4878f2778bb7a853263a2c1f2e1dd670c452c7ea Merge: 16a97f5 8005c49 Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Dec 6 22:43:17 2015 +0800
Merge tag 'v4.4-rc1' into merge/master
Linux 4.4-rc1
commit bce19ab21b1aaea5bac0caff05ea808b2e987537 Merge: 5b0b10e 1e73793 Author: Simon Wunderlich sw@simonwunderlich.de Date: Thu Nov 26 14:01:40 2015 +0100
Merge branch 'next'
commit e25bd38b0f8b4aeca85ef24884fa5eadd6270709 Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Nov 23 20:28:56 2015 +0100
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 1e73793d319c051fe5907a64310cf0d83afe155a Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Nov 23 20:30:15 2015 +0100
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit aadac513d839ab5b709569a11c225cd65dc54dd2 Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Nov 23 20:27:59 2015 +0100
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 5b0b10ea4b6adb532b9b21f6b90454574b3a9e6a Author: Sven Eckelmann sven@narfation.org Date: Sun Nov 22 00:59:30 2015 +0100
batman-adv: Add missing forward declaration for net_device
A new function batadv_bla_status_update was introduced which uses the not yet defined struct net_device as parameter. Add the forward declaration to avoid compiler warnings about type declarations inside parameter list.
Fixes: 07ed3c31d795 ("batman-adv: purge bridge loop avoidance when its disabled") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit b1199c6da8365996cc96d59133b04add9346192e Author: Markus Elfring elfring@users.sourceforge.net Date: Tue Nov 3 20:41:02 2015 +0100
batman-adv: Split a condition check
Let us split a check for a condition at the beginning of the batadv_is_ap_isolated() function so that a direct return can be performed in this function if the variable "vlan" contained a null pointer.
Signed-off-by: Markus Elfring elfring@users.sourceforge.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit bbcbe0f900de7b0951eb02a783017868054a13fd Author: Markus Elfring elfring@users.sourceforge.net Date: Tue Nov 3 19:20:34 2015 +0100
batman-adv: Delete an unnecessary check before the function call "batadv_softif_vlan_free_ref"
The batadv_softif_vlan_free_ref() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring elfring@users.sourceforge.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5a878b8f1a0b84d0dbf02e34b63e150bfa20c036 Author: Markus Elfring elfring@users.sourceforge.net Date: Sun Nov 15 09:00:42 2015 +0100
batman-adv: Less checks in batadv_tvlv_unicast_send()
* Let us return directly if a call of the batadv_orig_hash_find() function returned a null pointer.
* Omit the initialisation for the variable "skb" at the beginning.
* Replace an assignment by a call of the kfree_skb() function and delete the affected variable "ret" then.
Signed-off-by: Markus Elfring elfring@users.sourceforge.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 77d84a6c17ae98194541ac16e8a9df748e4a0795 Author: Markus Elfring elfring@users.sourceforge.net Date: Sun Nov 15 08:04:43 2015 +0100
batman-adv: Delete unnecessary checks before the function call "kfree_skb"
The kfree_skb() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring elfring@users.sourceforge.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c57af3a7c3dc3b3649ded771988fe4a108ec1945 Author: Simon Wunderlich simon@open-mesh.com Date: Mon Nov 9 16:20:53 2015 +0100
batman-adv: increase BLA wait periods to 6
If networks take a long time to come up, e.g. due to lossy links, then the bridge loop avoidance wait time to suppress broadcasts may not wait long enough and detect a backbone before the mesh is brought up. Increasing the wait period further to 60 seconds makes this scenario less likely.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 07ed3c31d79582b097650bd57d64548c3c480aa4 Author: Simon Wunderlich simon@open-mesh.com Date: Mon Nov 9 16:20:52 2015 +0100
batman-adv: purge bridge loop avoidance when its disabled
When bridge loop avoidance is disabled through sysfs, the internal datastructures are not disabled, but only BLA operations are disabled. To be sure that they are removed, purge the data immediately. That is especially useful if a firmwares network state is changed, and the BLA wait periods should restart on the new network.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 743df4680603393e6f0c170202dc5121c3ae273b Author: Simon Wunderlich simon@open-mesh.com Date: Tue Nov 17 14:11:26 2015 +0100
batman-adv: only call post function if something changed
Currently, the post function is also called on errors or if there were no changes, which is redundant for the functions currently using these facilities.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6b9ec9fe6ac57becc63add4d140119dcf051b274 Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Nov 17 16:40:53 2015 +0800
batman-adv: add kernel doc for AP isolation attributes in bat_priv
Cc: Sven Eckelmann sven@narfation.org Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit dbc613ce1e57eb98f9265280f55aad090f2bce2a Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Nov 17 16:40:52 2015 +0800
batman-adv: fix kerneldoc for TT functions
Cc: Sven Eckelmann sven@narfation.org Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 53aa898a2791af4dbb757c81f297f50623def2f7 Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Nov 17 16:40:51 2015 +0800
batman-adv: fix kerneldoc for DAT functions
Cc: Sven Eckelmann sven@narfation.org Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c88144124d34e69793c0d760d5d5a9305231d13d Merge: 4c652b9 1ed6b1f Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Nov 18 16:44:28 2015 +0800
Merge branch 'next'
commit 1ed6b1fc32cba57778a84b85dc1257838cbe3288 Merge: c96b7dc 5019fc0 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Nov 18 16:44:09 2015 +0800
Merge branch 'maint' into next
commit 5019fc0faac0d8f0b377dbc7d27a3899c45237c3 Author: Sven Eckelmann sven@narfation.org Date: Wed Nov 18 09:41:41 2015 +0100
batman-adv: Fix variable declaration warning in batadv_compare_tt
checkpatch is warning about the wrong way a pointer is declared in batadv_compare_tt.
ERROR: "foo* bar" should be "foo *bar" #80: FILE: ./net/batman-adv/translation-table.c:80: + const struct batadv_tt_common_entry* tt1 = data1;
Fixes: af5fa950cbb6 ("batman-adv: fix erroneous client entry duplicate detection") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4c652b932088993cf916a28477820e0f814558ac Author: Sven Eckelmann sven@narfation.org Date: Wed Oct 28 10:58:00 2015 +0100
batman-adv: Change ifconfig examples to iproute2
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f4b76a0e7eec52b6bf10312edc4749113cb54055 Merge: 41a559a c96b7dc Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Nov 17 16:50:01 2015 +0800
Merge branch 'next'
commit c96b7dc10b6ce1e79655cf7ac0f800e854783f63 Merge: 553b8bf e897e5e Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Nov 17 16:49:39 2015 +0800
Merge branch 'maint' into next
commit e897e5ed34eaa8fcf4b1dabebecb571ce3d186cd Author: Sven Eckelmann sven@open-mesh.com Date: Tue Nov 3 10:05:44 2015 +0100
batman-adv: Fix invalid stack access in batadv_dat_select_candidates
batadv_dat_select_candidates provides an u32 to batadv_hash_dat but it needs a batadv_dat_entry with at least ip and vid filled in.
Fixes: 3e26722bc9f2 ("batman-adv: make the Distributed ARP Table vlan aware") Signed-off-by: Sven Eckelmann sven@open-mesh.com Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 41a559a1d48b6fbb17690b7bdcc155668a8e751d Author: Sven Eckelmann sven@open-mesh.com Date: Tue Nov 3 17:43:05 2015 +0100
batman-adv: Fix lockdep annotation of batadv_tlv_container_remove
The function handles tlv containers and not tlv handlers. Thus the lockdep_assert_held has to check for the container_list lock.
Fixes: 5b95c427d187 ("batman-adv: Annotate deleting functions with external lock via lockdep") Signed-off-by: Sven Eckelmann sven@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit dd54d61b7ae1634848ba8ea55f8b3306dad52048 Merge: 348a5da 553b8bf Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Nov 17 16:24:56 2015 +0800
Merge branch 'next'
commit 553b8bf6d365be15303d50bd58e9446c89f68300 Merge: 0437624 af5fa95 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Nov 17 16:23:53 2015 +0800
Merge branch 'maint' into next
commit af5fa950cbb6b6c4121763ea8d505a30219a3e2e Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Aug 6 10:38:54 2015 +0200
batman-adv: fix erroneous client entry duplicate detection
The translation table implementation, namely batadv_compare_tt(), is used to compare two client entries and deciding if they are the holding the same information. Each client entry is identified by its mac address and its VLAN id (VID). Consequently, batadv_compare_tt() has to not only compare the mac addresses but also the VIDs.
Without this fix adding a new client entry that possesses the same mac address as another client but operates on a different VID will fail because both client entries will considered identical.
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 348a5da825c7f51e4ee0261dd8f9cbcd3a88f744 Author: Sven Eckelmann sven@open-mesh.com Date: Mon Nov 9 22:04:20 2015 +0100
batman-adv: Add function to convert string to batadv throughput
The code to convert the throughput information from a string to the batman-adv internal (100Kibit/s) representation is duplicated in batadv_parse_gw_bandwidth. Move this functionality to its own function batadv_parse_throughput to reduce the code complexity.
Signed-off-by: Sven Eckelmann sven@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit eb90dff3953a38dc7b7ca8b163e12a4319057711 Author: Simon Wunderlich sw@simonwunderlich.de Date: Fri Nov 6 10:45:19 2015 +0100
batman-adv: Update/repair bridge loop avoidance kerneldoc
Cc: Sven Eckelmann sven@narfation.org Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5d28c44a69879fd71b74ad6305f8b1f0ab27c4a7 Author: Sven Eckelmann sven@narfation.org Date: Sat Oct 31 12:29:30 2015 +0100
batman-adv: Fix kerneldoc of network-coding functions
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d7a21c1ae92e953f4130b543cba36c01a47a3707 Author: Sven Eckelmann sven@narfation.org Date: Sat Oct 31 12:29:29 2015 +0100
batman-adv: Fix kerneldoc of main functions
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 425ba692c62916ef4395d3be9cd3b1f896d486e3 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Aug 15 18:04:59 2015 +0800
batman-adv: kernel doc readability updates
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f7b3226d3ba9940aa38b30fa2a28498e5b0abadf Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Aug 9 23:56:50 2015 +0800
batman-adv: remove leftovers of unused BATADV_PRIMARIES_FIRST_HOP flag
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit b615fbabb138c0a91035f49cf6c36cb872adb146 Author: Sven Eckelmann sven@narfation.org Date: Tue Sep 15 19:00:48 2015 +0200
batman-adv: Fix kerneldoc parsing of return description
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit cef7403c2ec6f3051dfb2f8e4448276b87092097 Author: Sven Eckelmann sven@narfation.org Date: Sun Sep 13 09:44:45 2015 +0200
batman-adv: Place constant on right side of comparison
checkpatch warns when the constant is on the left side of a comparison.
Fixes: 56fd0bab9c18 ("batman-adv: Fix gw_bandwidth calculation on 32 bit systems") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit cb6dfb421034ed0e03acd2d4385ee271d779898f Author: Sven Eckelmann sven@narfation.org Date: Sun Sep 6 21:38:53 2015 +0200
batman-adv: Drop invalid kerneldoc for variable batadv_vlan_attrs
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 1388a2e174434d400e6541dc3c6850f7015add65 Author: Sven Eckelmann sven@narfation.org Date: Sun Sep 6 21:38:51 2015 +0200
batman-adv: Fix names in kerneldoc of functions
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 54b3211da65e27faa007abde59690980661f3a65 Author: Sven Eckelmann sven@narfation.org Date: Sun Sep 6 21:38:50 2015 +0200
batman-adv: Remove kerneldoc for missing parameters
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5e5e8feccb6e43c6e60be5c9193446d9530090fe Author: Sven Eckelmann sven@narfation.org Date: Sun Sep 6 21:38:49 2015 +0200
batman-adv: Fix kerneldoc parsing of structs/enums
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 8c8e792a6c2acaae62593410835b3a85a546513f Author: Sven Eckelmann sven@narfation.org Date: Sun Sep 6 21:38:48 2015 +0200
batman-adv: Add kerneldoc for batadv_neigh_node::refcount
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit abdde59cce09a50a8b8e6aa8d10c7ddc7c645d9f Author: Sven Eckelmann sven@narfation.org Date: Sun Sep 6 21:38:47 2015 +0200
batman-adv: Remove kerneldoc for missing struct members
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 8643c4240567be5033df257a3afb25c1bbdf4c58 Author: Sven Eckelmann sven@narfation.org Date: Sun Sep 6 21:38:46 2015 +0200
batman-adv: Fix kerneldoc member names in for main structs
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit af45ff7c1e301e0bd40852d095ce60acfc404c44 Author: Sven Eckelmann sven@narfation.org Date: Sun Sep 6 21:38:45 2015 +0200
batman-adv: Fix kernel-doc parsing of main structs
kernel-doc is not able to skip an #ifdef between the kernel documentation block and the start of the struct. Moving the #ifdef before the kernel doc block avoids this problem
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 8cf7942ed77479613095cb6dad27c6942ed28e1f Merge: e72ce42 0437624 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Sep 13 18:23:08 2015 +0800
Merge branch 'next'
commit 04376241f586e8e49753b4372611c2d076624756 Merge: 6846ad8 b307e72 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Sep 13 18:22:15 2015 +0800
Merge branch 'maint' into next
commit b307e72d119f0ca5cf3c00d05d62320975261ef4 Author: Simon Wunderlich sw@simonwunderlich.de Date: Fri Sep 11 18:04:13 2015 +0200
batman-adv: lock crc access in bridge loop avoidance
We have found some networks in which nodes were constantly requesting other nodes BLA claim tables to synchronize, just to ask for that again once completed. The reason was that the crc checksum of the asked nodes were out of sync due to missing locking and multiple writes to the same crc checksum when adding/removing entries. Therefore the asked nodes constantly reported the wrong crc, which caused repeating requests.
To avoid multiple functions changing a backbone gateways crc entry at the same time, lock it using a spinlock.
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Tested-by: Alfons Name AlfonsName@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e72ce421b9cce28a400c78b4bdc48a36750d0299 Author: Sven Eckelmann sven@narfation.org Date: Wed Aug 26 10:31:51 2015 +0200
batman-adv: Fix typo 'wether' -> 'whether'
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d54f7c88c25064c5eee38ab1d1eabe020f8b023c Author: Sven Eckelmann sven@narfation.org Date: Wed Aug 26 10:31:50 2015 +0200
batman-adv: Use chain pointer when purging fragments
The chain pointer was already created in batadv_frag_purge_orig to make the checks more readable. Just use the chain pointer everywhere instead of having the same dereference + array access in the most lines of this function.
Signed-off-by: Sven Eckelmann sven@narfation.org Acked-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d7380251fc66cc3902c4b00643f4715ff4c71e2e Author: Simon Wunderlich sw@simonwunderlich.de Date: Wed Aug 26 16:33:34 2015 +0200
batman-adv: unify flags access style in tt global add
This should slightly improve readability
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2a938c750a3ffe57baa22ce37e7a20617899473d Merge: 41e304b 6846ad8 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Sep 6 16:27:38 2015 +0800
Merge branch 'next'
commit 6846ad869ff55346cb572e90fb5fb9440c60061f Merge: 5c11589 2dd1d9f06 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Sep 6 16:25:32 2015 +0800
Merge branch 'maint' into next
commit 2dd1d9f06ac1208b1921aa90d479c3940bc70b4f Author: Simon Wunderlich sw@simonwunderlich.de Date: Wed Sep 2 20:09:56 2015 +0200
batman-adv: detect local excess vlans in TT request
If the local representation of the global TT table of one originator has more VLAN entries than the respective TT update, there is some inconsistency present. By detecting and reporting this inconsistency, the global table gets updated and the excess VLAN will get removed in the process.
Reported-by: Alessandro Bolletta alessandro@mediaspot.net Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4a73d7438dfb60c7ac82758875292bc14f363b45 Author: Simon Wunderlich sw@simonwunderlich.de Date: Wed Sep 2 20:09:55 2015 +0200
batman-adv: avoid keeping false temporary entry
In the case when a temporary entry is added first and a proper tt entry is added after that, the temporary tt entry is kept in the orig list. However the temporary flag is removed at this point, and therefore the purge function can not find this temporary entry anymore.
Therefore, remove the previous temp entry before adding the new proper one.
This case can happen if a client behind a given originator moves before the TT announcement is sent out. Other than that, this case can also be created by bogus or malicious payload frames for VLANs which are not existent on the sending originator.
Reported-by: Alessandro Bolletta alessandro@mediaspot.net Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2decb5f1fef1484f1b7319aaf2f36b5492d8d943 Author: Simon Wunderlich sw@simonwunderlich.de Date: Wed Sep 2 20:09:54 2015 +0200
batman-adv: fix speedy join for DAT cache replies
DAT Cache replies are answered on behalf of other clients which are not connected to the answering originator. Therefore, we shouldn't add these clients to the answering originators TT table through speed join to avoid bogus entries.
Reported-by: Alessandro Bolletta alessandro@mediaspot.net Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 41e304b2983b08b11952f64b36280f0bb313edae Merge: fff4c83 5c11589 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Sep 6 16:09:35 2015 +0800
Merge branch 'next'
commit 5c115891259452212a72b6b7380df767a5dfda38 Merge: 071aadb d126204 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Sep 6 16:08:52 2015 +0800
Merge branch 'maint' into next
commit d126204d0471e0972142697f36364443a0bbc9cc Author: Linus Lüssing linus.luessing@c0d3.blue Date: Fri Aug 14 17:23:50 2015 +0200
batman-adv: Remove unnecessary braces for test_bit() in MCAST
Fixes: 1798ad3f ("batman-adv: Fix broken MCAST capability check") Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5abaf07b4c24ab2d7bd9b0c0de946b1ee5e946ff Author: Linus Lüssing linus.luessing@c0d3.blue Date: Fri Aug 14 17:23:49 2015 +0200
batman-adv: Remove unnecessary braces for test_bit() in NC
Fixes: dfb27e75 ("batman-adv: Fix broken NC capability check") Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit af3558688698479a56034f0fcbca164be2052aa8 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Fri Aug 14 17:23:48 2015 +0200
batman-adv: Remove unnecessary braces for test_bit() in DAT
Fixes: de466678 ("batman-adv: Fix broken DAT capability check") Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit dba67bc80fbfe6a28fc3c1141cca1c556ab7e499 Author: Sven Eckelmann sven@narfation.org Date: Tue Aug 18 13:37:01 2015 +0200
batman-adv: Fix memory leak on tt add with invalid vlan
The object tt_local is allocated with kmalloc and not initialized when the function batadv_tt_local_add checks for the vlan. But this function can only cleanup the object when the (not yet initialized) reference counter of the object is 1. This is unlikely and thus the object would leak when the vlan could not be found.
Instead the uninitialized object tt_local has to be freed manually and the pointer has to set to NULL to avoid calling the function which would try to decrement the reference counter of the not existing object.
CID: 1316518 Fixes: 354136bcc3c4 ("batman-adv: fix kernel crash due to missing NULL checks") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit fff4c8303f5e09bed4cfdb45615a3b6b4cd70b6d Merge: e821b76 071aadb Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Aug 30 17:58:13 2015 +0800
Merge branch 'next'
commit 071aadbb05e4f6ff1c25c5b1ef58f5158d31a8ac Author: Phil Sutter phil@nwl.cc Date: Wed Aug 26 10:24:41 2015 +0200
batman-adv: convert to using IFF_NO_QUEUE
Signed-off-by: Phil Sutter phil@nwl.cc Cc: Marek Lindner mareklindner@neomailbox.ch Cc: Simon Wunderlich sw@simonwunderlich.de Cc: Antonio Quartulli antonio@meshcoding.com Signed-off-by: David S. Miller davem@davemloft.net [sven@narfation.org: added compat hack] Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 16a97f56ae4ab29cb8dec0453319bddb74a949f1 Merge: 7efa6e7 2cbcd1d Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Aug 25 00:28:39 2015 +0200
Merge remote-tracking branch 'pkg/next' into merge/master
commit e821b76b67a0adcbb807ee29c930bb43c3d434d8 Author: Sven Eckelmann sven@narfation.org Date: Sat Aug 8 02:46:45 2015 +0200
batman-adv: Mark batadv_hardif_neigh_free_now as static
batadv_hardif_neigh_free_now is not used outside of originator.c and should thus be marked as static.
Fixes: fed2826b490c ("batman-adv: add list of unique single hop neighbors per hard-interface") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a0f15fc75c8c8009d2130cf95098c7970656dfc1 Author: Sven Eckelmann sven@narfation.org Date: Sat Aug 8 02:37:01 2015 +0200
batman-adv: Mark batadv_iv_neigh_print as static
batadv_iv_neigh_print is not used outside of bat_iv_ogm.c and should thus be marked as static.
Fixes: 2e1133841c44 ("batman-adv: export single hop neighbor list via debugfs") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 0804b622d434046a7473827f39c77f55267f81eb Author: Sven Eckelmann sven@narfation.org Date: Sat Aug 8 02:31:49 2015 +0200
batman-adv: Add missing include spinlock.h
Fixes: fed2826b490c ("batman-adv: add list of unique single hop neighbors per hard-interface") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 81e457e875cb2fc947d148188b9e3332693e641b Author: Simon Wunderlich sw@simonwunderlich.de Date: Sat Aug 8 02:01:50 2015 +0200
batman-adv: rename equiv/equal or better to similar or better
Since the function applies a threshold and also slightly worse values are accepted, ''equal or better'' does not represent the intention of the function. ''Similar or better'' represents that better.
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a6fff8b995cd76bbe603dcb8fd9b2f0af44a4c0b Merge: 64382bc 2cbcd1d Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Aug 9 08:18:29 2015 +0800
Merge branch 'next'
commit 2cbcd1d34767ede4ba7958a7b9d464f82d6990a9 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Aug 4 23:31:44 2015 +0800
batman-adv: turn batadv_neigh_node_get() into local function
commit c214ebe1eb29 ("batman-adv: move neigh_node list add into batadv_neigh_node_new()") removed external calls to batadv_neigh_node_get().
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 64382bc56ee9452ad01701eed1b5a4525b6c4d7b Merge: 817b244 8ce897a Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Aug 8 03:07:19 2015 +0800
Merge branch 'next'
commit 8ce897a4794bccf6a66b92f63cbb5cce040e8465 Merge: 16d21dc e2b4301 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Aug 8 03:05:18 2015 +0800
Merge branch 'maint' into next
commit e2b4301f4e2d3695ed2024880d2295223cb2f857 Author: Sven Eckelmann sven@narfation.org Date: Fri Aug 7 19:28:42 2015 +0200
batman-adv: Add lower layer needed_(head|tail)room to own ones
The maximum of hard_header_len and maximum of all needed_(head|tail)room of all slave interfaces of a batman-adv device must be used to define the batman-adv device needed_(head|tail)room. This is required to avoid too small buffer problems when these slave devices try to send the encapsulated packet in a tx path without the possibility to resize the skbuff.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 817b244043be34c1f1d334befa36c327d42b97ec Merge: 6d9f616 16d21dc Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Aug 8 00:48:47 2015 +0800
Merge branch 'next'
commit 16d21dc13ee849267206e37c39df14977d476254 Merge: bea6f41 958aafb Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Aug 8 00:48:30 2015 +0800
Merge branch 'maint' into next
commit 958aafba93c7e408237298c5b2c5d7c3e318402c Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Aug 4 22:26:19 2015 +0200
batman-adv: don't access unregistered net_device object
In batadv_hardif_disable_interface() there is a call to batadv_softif_destroy_sysfs() which in turns invokes unregister_netdevice() on the soft_iface. After this point we cannot rely on the soft_iface object anymore because it might get free'd by the netdev periodic routine at any time.
For this reason the netdev_upper_dev_unlink(.., soft_iface) call is moved before the invocation of batadv_softif_destroy_sysfs() so that we can be sure that the soft_iface object is still valid.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6d9f6164a6e3c55d0902f32a13c8735317bc535f Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Aug 4 21:09:58 2015 +0800
batman-adv: update last seen field of single hop originators
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2e1133841c44fa97b364b8426701c249fa343ddc Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Aug 4 21:09:57 2015 +0800
batman-adv: export single hop neighbor list via debugfs
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e46832d53287311e801ebb9f9fb09ea63b34f5d2 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Aug 4 21:09:56 2015 +0800
batman-adv: add bat_hardif_neigh_init algo ops call
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit fed2826b490ce1daaf039a87a5b2a3d04b8940da Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Aug 4 21:09:55 2015 +0800
batman-adv: add list of unique single hop neighbors per hard-interface
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c9bac8ff2cad9a36548abdf017c85b3c38b8ec58 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Aug 4 23:31:44 2015 +0800
batman-adv: turn batadv_neigh_node_get() into local function
commit c214ebe1eb29 ("batman-adv: move neigh_node list add into batadv_neigh_node_new()") removed external calls to batadv_neigh_node_get().
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit bea6f41c8e09e02d5a3bc78200bd3e9c11a287b4 Merge: 07269be d27b2ba Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Aug 4 17:48:48 2015 +0200
Merge branch 'next'
commit 07269bea2ef06723a3c1045a60635bf370e41c42 Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Aug 4 15:44:06 2015 +0200
batman-adv: fix gateway client style issues
commit 0511575c4d03 ("batman-adv: remove obsolete deleted attribute for gateway node") incorrectly added an empy line and forgot to remove an include.
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 95b64b1cef38340f48f4eba99689e0fb1feddcd0 Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Aug 4 14:37:19 2015 +0200
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit d27b2ba40a5eff2c4a5496a82d3ef96c977ac491 Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Aug 4 14:43:16 2015 +0200
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit e9aa5850b7f48caece78522b385a1c9976641d73 Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Aug 4 14:36:23 2015 +0200
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 7efa6e7f22fa5b88b7b27bd771dcfc91083abff8 Merge: 2be28ed 126c2f7 Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Aug 4 10:35:40 2015 +0200
Merge remote-tracking branch 'pkg/next' into merge/master
commit ce54500bf9a42348f4b0c9e0a7a61f91590d3b8d Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Jul 26 04:59:15 2015 +0800
batman-adv: rearrange batadv_neigh_node_new() arguments to follow convention
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Simon Wunderlich sw@simonwunderlich.de
commit 0511575c4d034115f618056da65ee51eb25d314d Author: Simon Wunderlich simon@open-mesh.com Date: Mon Aug 3 19:13:58 2015 +0200
batman-adv: remove obsolete deleted attribute for gateway node
With rcu, the gateway node deleted attribute is not needed anymore. In fact, it may delay the free of the gateway node and its referenced structures. Therefore remove it altogether and simplify purging as well.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c214ebe1eb2960d8c528e1a160da0d433e4425af Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Jul 26 04:57:43 2015 +0800
batman-adv: move neigh_node list add into batadv_neigh_node_new()
All batadv_neigh_node_* functions expect the neigh_node list item to be part of the orig_node->neigh_list, therefore the constructor of said list item should be adding the newly created neigh_node to the respective list.
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Simon Wunderlich sw@simonwunderlich.de
commit f645ed95afc2fbf340a6e25352dadbd8e115a753 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Jul 26 04:37:47 2015 +0800
batman-adv: remove redundant hard_iface assignment
The batadv_neigh_node_new() function already sets the hard_iface pointer.
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Simon Wunderlich sw@simonwunderlich.de
commit 02cf80cac9e92231c66360efac35406b05afba27 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Jul 26 04:37:15 2015 +0800
batman-adv: move hardif refcount inc to batadv_neigh_node_new()
The batadv_neigh_node cleanup function 'batadv_neigh_node_free_rcu()' takes care of reducing the hardif refcounter, hence it's only logical to assume the creating function of that same object 'batadv_neigh_node_new()' takes care of increasing the same refcounter.
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Simon Wunderlich sw@simonwunderlich.de
commit e017251099df603ec0857dfe306bed2434d7b487 Merge: 4610f5d 126c2f7 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jul 20 13:51:20 2015 +0800
Merge branch 'next'
commit 126c2f7a7c7d75ba85205d3c0756fd6ec0366c93 Merge: 8592db1 7ad001a Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jul 20 13:50:46 2015 +0800
Merge branch 'maint' into next
commit 7ad001a18d1a6e2fd19969fdd671efe99d75920f Author: Sven Eckelmann sven@narfation.org Date: Fri Jul 17 10:03:43 2015 +0200
batman-adv: Avoid crashing kernel with multicast asserts
The BUG_ON added to the multicast code in commit 7f220ed1f063 ("batman-adv: Fix potential synchronization issues in mcast tvlv handler") will crash the kernel when the statement is true. This is not strictly required and a WARN_ON is enough to raise attention.
Signed-off-by: Sven Eckelmann sven@narfation.org Acked-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4610f5dab5690a4bb20809eddb0f210ca2e2a625 Author: Marek Lindner mareklindner@neomailbox.ch Date: Fri Jul 17 22:25:59 2015 +0800
batman-adv: beautify supported routing algorithm list
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a25feff783426cf489eec36840eb3dd0ca749a7a Author: Sven Eckelmann sven@narfation.org Date: Fri Jul 17 10:03:42 2015 +0200
batman-adv: Fix conditional statements indentation
commit 29b9256e6631 ("batman-adv: consider outgoing interface in OGM sending") incorrectly indented the interface check code.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 7da6fe1da1d3210fc700dd4db1951b64aa249e4b Merge: d5e1bbd 8592db1 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jul 13 11:15:37 2015 +0800
Merge branch 'next'
commit 8592db1918a00a5daeb4aab946b599204b15731a Merge: a8c7689 02008ee Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jul 13 11:14:39 2015 +0800
Merge branch 'maint' into next
commit 02008ee7543a6da10b7d8c648701f031da034365 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Tue Jun 30 23:45:26 2015 +0200
batman-adv: Fix potentially broken skb network header access
The two commits noted below added calls to ip_hdr() and ipv6_hdr(). They need a correctly set skb network header.
Unfortunately we cannot rely on the device drivers to set it for us. Therefore setting it in the beginning of the according ndo_start_xmit handler.
Fixes: 405cc1e5 ("batman-adv: Modified forwarding behaviour for multicast packets") Fixes: 1c090349 ("batman-adv: Add IPv4 link-local/IPv6-ll-all-nodes multicast support") Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d5e1bbd456cdc4762d6ce5a6c45e890ef3a7b0d5 Author: Sven Eckelmann sven@narfation.org Date: Sun Jun 21 15:23:04 2015 +0200
batman-adv: Add compat code for lockdep_assert_held
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2a449bcf3088f05ea1656a9da5d7ed2dbb5b6f8f Author: Sven Eckelmann sven@narfation.org Date: Sun Jun 21 14:45:15 2015 +0200
batman-adv: Add lockdep_asserts for documented external locks
Some functions already have documentation about locks they require inside their kerneldoc header. These can be directly tested during runtime using the lockdep asserts.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5b95c427d18799a5cd069dcdce5fecda44e19614 Author: Sven Eckelmann sven@narfation.org Date: Sun Jun 21 14:45:14 2015 +0200
batman-adv: Annotate deleting functions with external lock via lockdep
Functions which use (h)list_del* are requiring correct locking when they operate on global lists. Most of the time the search in the list and the delete are done in the same function. All other cases should have it visible that they require a special lock to avoid race conditions.
Lockdep asserts can be used to check these problem during runtime when the lockdep functionality is enabled.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 1bd0558d1404cd831acb87796d1c71e6a00f9278 Author: Sven Eckelmann sven@narfation.org Date: Mon Jun 22 09:23:40 2015 +0200
batman-adv: Add missing include rculist.h
originator.c is using hlist_for_each_entry_rcu but did not include the required header for it.
Reported-by: Marek Lindner mareklindner@neomailbox.ch Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c5bcd65170508a9ae81c12b77819be518fa17d08 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Jun 28 22:16:06 2015 +0800
batman-adv: convert bat_priv->tt.req_list to hlist
Since the list's tail is never accessed using a double linked list head wastes memory.
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e9eeb9371a60708f9650e473f7dc1a2b518baaee Merge: 56fd0ba a8c7689 Author: Marek Lindner mareklindner@neomailbox.ch Date: Fri Jul 10 16:15:01 2015 +0800
Merge branch 'next'
Conflicts: net/batman-adv/gateway_client.c
commit a8c7689669ab27af7da051df467704c4ea011a58 Merge: cc063e9 013aab3 Author: Marek Lindner mareklindner@neomailbox.ch Date: Fri Jul 10 16:12:42 2015 +0800
Merge branch 'maint' into next
commit 013aab341e246a565b1ba96557123a6b7b98e08d Author: Sven Eckelmann sven@narfation.org Date: Mon Jun 22 09:13:23 2015 +0200
batman-adv: Replace gw_reselect 64 bit div with shift
The 64-bit gw_factor is divided by BATADV_TQ_LOCAL_WINDOW_SIZE ** 2 * 64. But the rest of the calculation has nothing to do with the tq window size end therefore the calculation is just (tmp_gw_factor / (64 ** 3)).
The problem with 64 bit div is that it doesn't work on systems without native 64 bit div support. It has to be emulated using do_div or div_u64. The change in f63c54bba31d ("batman-adv: Avoid u32 overflow during gateway select") only compiled on such systems because the compiler converted the div to a (tmp_gw_factor >> 18). Making this explicit avoids having build problems in the future when BATADV_TQ_LOCAL_WINDOW_SIZE is changed in such a way that (BATADV_TQ_LOCAL_WINDOW_SIZE ** 2 * 64) is not a power of two.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 56fd0bab9c18f7ea5259f283af47f7464214d0f7 Author: Sven Eckelmann sven@narfation.org Date: Sun Jun 21 19:40:09 2015 +0200
batman-adv: Fix gw_bandwidth calculation on 32 bit systems
The TVLV for the gw_bandwidth stores everything as u32. But the gw_bandwidth reads the signed long which limits the maximum value to (2 ** 31 - 1) on systems with 4 byte long. Also the input value is always converted from either Mibit/s or Kibit/s to 100Kibit/s. This reduces the values even further when the user sets it via the default unit Kibit/s. It may even cause an integer overflow and end up with a value the user never intended.
Instead read the values as u64, check for possible overflows, do the unit adjustments and then reduce the size to u32.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 557adc412fb47d44d77ae62d06067450c1c8fa6a Author: Sven Eckelmann sven@narfation.org Date: Sun Jun 21 14:42:51 2015 +0200
batman-adv: Define (u|s)(8|16|32|64) limits for Linux < 3.14
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 194b581c677d267ce71b9bcd86fa1642a5e9e3d1 Author: Sven Eckelmann sven@narfation.org Date: Sun Jun 21 14:42:50 2015 +0200
batman-adv: Backport kstrtou64 for Linux < 2.6.39
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f1b48f24cd055f03c3006f0be76b217493380a93 Merge: aa203f7 cc063e9 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Jul 7 16:49:13 2015 +0800
Merge branch 'next'
commit cc063e98e6d8de9f17fe2d6a196aea1734cbadf9 Merge: 2fc460e 1798ad3 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Jul 7 16:48:35 2015 +0800
Merge branch 'maint' into next
commit 1798ad3fb6ba72f8c6f96024b27ad27193648787 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Fri Jul 3 18:29:59 2015 +0200
batman-adv: Fix broken MCAST capability check
The introduction of set_bit() and clear_bit() calls in batman-adv wrongly passed bitmasks and not the bit numbers to these functions. This leads to broken capability checks.
Fixing this by making the capability enum a non-bitmasked one and by that passing non-masked values to set_bit()/clear_bit().
Fixes: 201a54ba710a ("batman-adv: Make MCAST capability changes atomic") Reported-by: Def def@laposte.net Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a4824ffaa200050a0b3e68101ebe074a7c45b7d5 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Fri Jul 3 18:29:58 2015 +0200
batman-adv: Fix broken TT capability check
The introduction of set_bit() and clear_bit() calls in batman-adv wrongly passed bitmasks and not the bit numbers to these functions. This leads to broken capability checks.
Fixing this by making the capability enum a non-bitmasked one and by that passing non-masked values to set_bit()/clear_bit().
Fixes: a51fa16ecf3f ("batman-adv: Make TT capability changes atomic") Reported-by: Def def@laposte.net Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit dfb27e75b5586e356e88b9d827d772a6cbdf3cc1 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Fri Jul 3 18:29:57 2015 +0200
batman-adv: Fix broken NC capability check
The introduction of set_bit() and clear_bit() calls in batman-adv wrongly passed bitmasks and not the bit numbers to these functions. This leads to broken capability checks.
Fixing this by making the capability enum a non-bitmasked one and by that passing non-masked values to set_bit()/clear_bit().
Fixes: 586df9e2537b ("batman-adv: Make NC capability changes atomic") Reported-by: Def def@laposte.net Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit de4666781c5a64cd55aa6688f77de95f8f66b2c0 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Fri Jul 3 18:29:56 2015 +0200
batman-adv: Fix broken DAT capability check
The introduction of set_bit() and clear_bit() calls in batman-adv wrongly passed bitmasks and not the bit numbers to these functions. This leads to broken capability checks.
Fixing this by making the capability enum a non-bitmasked one and by that passing non-masked values to set_bit()/clear_bit().
Fixes: bfd0fbaef270 ("batman-adv: Make DAT capability changes atomic") Reported-by: Def def@laposte.net Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit aa203f7ff14c2a5e688c023969a68a44aae8f1b0 Author: Sven Eckelmann sven@narfation.org Date: Sun Jun 21 14:42:49 2015 +0200
batman-adv: Return EINVAL on invalid gw_bandwidth change
Invalid speed settings by the user are currently acknowledged as correct but not stored. Instead the return of the store operation of the file "gw_bandwidth" should indicate that the given value is not acceptable.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4729a33528e05ea858d8337769584cb49961fc0e Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jun 22 00:30:23 2015 +0800
batman-adv: prevent potential hlist double deletion
The hlist_del_rcu() call in batadv_tt_global_size_mod() does not check if the element still is part of the list prior to deletion. The atomic list counter should prevent the worst but converting to hlist_del_init_rcu() ensures the element can't be deleted more than once.
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Antonio Quartulli antonio@meshcoding.com
commit 8d85d130c9fd09e69f8b6e2b56863d24849292cd Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jun 22 00:30:22 2015 +0800
batman-adv: convert orig_node->vlan_list to hlist
Since the list's tail is never accessed using a double linked list head wastes memory.
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Antonio Quartulli antonio@meshcoding.com
commit f2a420406454c9667c25f8e55814e4aee96d21e5 Merge: f7d2e57 2fc460e Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Jun 28 21:59:21 2015 +0800
Merge branch 'next'
commit 2fc460e52c85839846ef6f03f53291fbd4b759a0 Merge: 2474b5d 07bec2d4 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Jun 28 21:58:46 2015 +0800
Merge branch 'maint' into next
commit 07bec2d4dec83f024baf166b95cf037be3a7eca5 Author: Simon Wunderlich simon@open-mesh.com Date: Wed Jun 24 14:50:20 2015 +0200
batman-adv: remove broadcast packets scheduled for purged outgoing if
When an interface is purged, the broadcast packets scheduled for this interface should get purged as well.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 3c92b633715b7eca80dc7a2347e0e4dbcce1f018 Author: Simon Wunderlich simon@open-mesh.com Date: Wed Jun 24 14:50:19 2015 +0200
batman-adv: initialize up/down values when adding a gateway
Without this initialization, gateways which actually announce up/down bandwidth of 0/0 could be added. If these nodes get purged via _batadv_purge_orig() later, the gw_node structure does not get removed since batadv_gw_node_delete() updates the gw_node with up/down bandwidth of 0/0, and the updating function then discards the change and does not free gw_node.
This results in leaking the gw_node structures, which references other structures: gw_node -> orig_node -> orig_node_ifinfo -> hardif. When removing the interface later, the open reference on the hardif may cause hangs with the infamous "unregister_netdevice: waiting for mesh1 to become free. Usage count = 1" message.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f7d2e577813a10d9773e79a83df6202c6d2159b7 Merge: 5138e6a 2474b5d Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Jun 24 16:08:27 2015 +0800
Merge branch 'next'
commit 2474b5d7925d79d8753085d56f947ca54067685a Merge: 7870bad 9bac35c Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Jun 24 16:07:21 2015 +0800
Merge branch 'maint' into next
commit 9bac35c1e4fab662522371f81147963e19693409 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jun 22 00:36:28 2015 +0800
batman-adv: protect tt request from double deletion
The list_del() calls were changed to list_del_init() to prevent an accidental double deletion in batadv_tt_req_node_new().
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Antonio Quartulli antonio@meshcoding.com
commit 5138e6a3701fd673e108b533f2aa8e46d495a5e2 Author: Sven Eckelmann sven@narfation.org Date: Thu Jun 18 18:53:24 2015 +0200
batman-adv: Add missing include for clear_/set_bit in TT
a51fa16ecf3f ("batman-adv: Make TT capability changes atomic") started to use use clear_bit and set_bit but did not add the include for these functions.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c0d00298d192329afb1613a47d3606cc403da6eb Author: Sven Eckelmann sven@narfation.org Date: Thu Jun 18 18:53:23 2015 +0200
batman-adv: Add missing include for clear_/set_bit in NC
586df9e2537b ("batman-adv: Make NC capability changes atomic") started to use clear_bit and set_bit but did not add the include for these functions.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit cfb15422f6896a20c279c679c2f71317b337a0eb Author: Sven Eckelmann sven@narfation.org Date: Thu Jun 18 18:53:22 2015 +0200
batman-adv: Add missing include for BUG_ON in MCAST
7f220ed1f063 ("batman-adv: Fix potential synchronization issues in mcast tvlv handler") started to use BUG_ON but did not add the include for these functions.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 0128bee5d58e48ae2d7e9afce9e0ecb2e8158056 Author: Sven Eckelmann sven@narfation.org Date: Thu Jun 18 18:53:21 2015 +0200
batman-adv: Add missing include for clear_/set_bit in MCAST
201a54ba710a ("batman-adv: Make MCAST capability changes atomic") started to use clear_bit and set_bit but did not add the include for these functions.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 746aecdc88377ae04d1eba8ac094ac40ec8b49a9 Author: Sven Eckelmann sven@narfation.org Date: Thu Jun 18 18:53:20 2015 +0200
batman-adv: Add missing include for clear_/set_bit in DAT
bfd0fbaef270 ("batman-adv: Make DAT capability changes atomic") started to use clear_bit and set_bit but did not add the include for these functions.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 31b0151401812a718e8f08328daa4abb5e1dc3d2 Author: Sven Eckelmann sven@narfation.org Date: Thu Jun 18 18:53:19 2015 +0200
batman-adv: Remove batadv_ types forward declarations
main.h is included in every file and is the only way to access types.h. This makes forward declarations for all types defined in types.h unnecessary.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 48e180150b7c49dcf440c954e4d0c93a1054d966 Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Jun 18 16:24:24 2015 +0800
batman-adv: rename batadv_new_tt_req_node to batadv_tt_req_node_new
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 8e53ad599b8a6852245eaa9ae497d1f1fd51488c Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Jun 18 16:11:07 2015 +0800
batman-adv: update kernel doc of batadv_tt_global_del_orig_entry()
The updated kernel doc & additional comment shall prevent accidental copy & paste errors or calling the function without the required precautions.
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c5765b1a98eefbf7d5888e2326d92f4b3d466611 Merge: 3e54c92 7870bad Author: Marek Lindner mareklindner@neomailbox.ch Date: Fri Jun 19 17:17:10 2015 +0800
Merge branch 'next'
commit 7870bad343c1d511fe596d4565ef3134c2470fa8 Merge: 2535f8c af912d7 Author: Marek Lindner mareklindner@neomailbox.ch Date: Fri Jun 19 17:16:21 2015 +0800
Merge branch 'maint' into next
Conflicts: net/batman-adv/translation-table.c
commit af912d77181f252e6fdd324592d006e30bc82909 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Jun 17 20:01:36 2015 +0800
batman-adv: protect tt_local_entry from concurrent delete events
The tt_local_entry deletion performed in batadv_tt_local_remove() was neither protecting against simultaneous deletes nor checking whether the element was still part of the list before calling hlist_del_rcu().
Replacing the hlist_del_rcu() call with batadv_hash_remove() provides adequate protection via hash spinlocks as well as an is-element-still-in-hash check to avoid 'blind' hash removal.
Fixes: 2443ba3 ("batman-adv: roaming handling mechanism redesign")
Reported-by: alfonsname@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Antonio Quartulli antonio@meshcoding.com
commit 2c2dfd886a400057ccbc66f1507c94ed909d2a89 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Jun 9 21:24:36 2015 +0800
batman-adv: fix kernel crash due to missing NULL checks
batadv_softif_vlan_get() may return NULL which has to be verified by the caller.
Fixes: 9729d20 ("batman-adv: fix TT VLAN inconsistency on VLAN re-add")
Reported-by: Ryan Thompson ryan@eero.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Antonio Quartulli antonio@meshcoding.com
commit 256776ef8562744f90ac9379364df4cf88291b49 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Thu Jun 18 06:47:19 2015 +0200
batman-adv: Fix compile error on deactivated MCAST feature
Some members of "struct batadv_orig_node" are not available if compiling without the multicast optimizations feature.
Fix this by moving their initialization into the right #ifdef's.
Fixes: 7f220ed1f063 ("batman-adv: Fix potential synchronization issues in mcast tvlv handler") Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 3e54c9219b965a7f6e54a5241ec8e546a1ca95c6 Merge: c71c622 2535f8c Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Jun 17 18:57:14 2015 +0800
Merge branch 'next'
Conflicts: net/batman-adv/multicast.c net/batman-adv/types.h
commit 2535f8c4329f833054d3856156e9460efb66988b Merge: 768323e 7f220ed Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Jun 17 18:49:53 2015 +0800
Merge branch 'maint' into next
commit 7f220ed1f063be00833bd34a013c8f3f45884031 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Tue Jun 16 17:10:26 2015 +0200
batman-adv: Fix potential synchronization issues in mcast tvlv handler
So far the mcast tvlv handler did not anticipate the processing of multiple incoming OGMs from the same originator at the same time. This can lead to various issues:
* Broken refcounting: For instance two mcast handlers might both assume that an originator just got multicast capabilities and will together wrongly decrease mcast.num_disabled by two, potentially leading to an integer underflow.
* Potential kernel panic on hlist_del_rcu(): Two mcast handlers might one after another try to do an hlist_del_rcu(&orig->mcast_want_all_*_node). The second one will cause memory corruption / crashes. (Reported by: Sven Eckelmann sven@narfation.org)
Right in the beginning the code path makes assumptions about the current multicast related state of an originator and bases all updates on that. The easiest and least error prune way to fix the issues in this case is to serialize multiple mcast handler invocations with a spinlock.
Fixes: 77ec494490d6 ("batman-adv: Announce new capability via multicast TVLV") Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 201a54ba710ab7f40b82ad3c109f702c47d0761f Author: Linus Lüssing linus.luessing@c0d3.blue Date: Tue Jun 16 17:10:25 2015 +0200
batman-adv: Make MCAST capability changes atomic
Bitwise OR/AND assignments in C aren't guaranteed to be atomic. One OGM handler might undo the set/clear of a specific bit from another handler run in between.
Fix this by using the atomic set_bit()/clear_bit() functions.
Fixes: 77ec494490d6 ("batman-adv: Announce new capability via multicast TVLV") Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a51fa16ecf3f079518baaa56bffae343bd5694f0 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Tue Jun 16 17:10:24 2015 +0200
batman-adv: Make TT capability changes atomic
Bitwise OR/AND assignments in C aren't guaranteed to be atomic. One OGM handler might undo the set/clear of a specific bit from another handler run in between.
Fix this by using the atomic set_bit()/clear_bit() functions.
Fixes: 5d2121af6d31 ("batman-adv: introduce capability initialization bitfield") Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 586df9e2537b51c0df7ce99576c3cee1681b64de Author: Linus Lüssing linus.luessing@c0d3.blue Date: Tue Jun 16 17:10:23 2015 +0200
batman-adv: Make NC capability changes atomic
Bitwise OR/AND assignments in C aren't guaranteed to be atomic. One OGM handler might undo the set/clear of a specific bit from another handler run in between.
Fix this by using the atomic set_bit()/clear_bit() functions.
Fixes: 7dd9d8992b0c ("batman-adv: tvlv - add network coding container") Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit bfd0fbaef270ac4ed8e4457a38ef8d91190c0540 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Tue Jun 16 17:10:22 2015 +0200
batman-adv: Make DAT capability changes atomic
Bitwise OR/AND assignments in C aren't guaranteed to be atomic. One OGM handler might undo the set/clear of a specific bit from another handler run in between.
Fix this by using the atomic set_bit()/clear_bit() functions.
Fixes: 2b1c07b918d2 ("batman-adv: tvlv - add distributed arp table container") Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c71c622d17b57a9f0dfd3426a251b9e6bba03bd1 Author: Sven Eckelmann sven@narfation.org Date: Tue Jun 9 20:50:49 2015 +0200
batman-adv: Remove multiple assignment per line
The Linux CodingStyle disallows multiple assignments in a single line. (see chapter 1)
Reported-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4c4512f73a7628781d86cda244943d7b8224b206 Merge: 2c236a3 768323e Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Jun 9 22:56:50 2015 +0800
Merge branch 'next'
Conflicts: net/batman-adv/distributed-arp-table.c net/batman-adv/gateway_client.c
commit 768323e2eacb5c9bf3b45557a648619ce3c71fc7 Merge: 34124bb 9bbd794 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Jun 9 22:52:04 2015 +0800
Merge branch 'maint' into next
commit 9bbd794030657fe0d38590cd67d4801b989cebf9 Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Jun 1 17:29:57 2015 +0200
batman-adv: avoid DAT to mess up LAN state
When a node running DAT receives an ARP request from the LAN for the first time, it is likely that this node will request the ARP entry through the distributed ARP table (DAT) in the mesh.
Once a DAT reply is received the asking node must check if the MAC address for which the IP address has been asked is local. If it is, the node must drop the ARP reply bceause the client should have replied on its own locally.
Forwarding this reply means fooling any L2 bridge (e.g. Ethernet switches) lying between the batman-adv node and the LAN. This happens because the L2 bridge will think that the client sending the ARP reply lies somewhere in the mesh, while this node is sitting in the same LAN.
Reported-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f63c54bba31d2c86269982fd8efdfb618f1daabe Author: Ruben Wisniewski ruben@freifunk-nrw.de Date: Tue May 26 18:34:27 2015 +0200
batman-adv: Avoid u32 overflow during gateway select
The gateway selection based on fast connections is using a single value calculated from the average tq (0-255) and the download bandwidth (in 100Kibit). The formula for the first step (tq ** 2 * 10000 * bandwidth) tends to overflow a u32 with low bandwidth settings like 50 [100KiBit] and a tq value of over 92.
Changing this to a 64 bit unsigned integer allows to support a bandwidth_down with up to ~2.8e10 [100KiBit] and a perfect tq of 255. This is ~6.6 times higher than the maximum possible value of the gateway announcement TVLV.
This problem only affects the non-default gw_sel_class 1.
Signed-off-by: Ruben Wisniewsi ruben@vfn-nrw.de [sven@narfation.org: rewritten commit message, changed to kernel type] Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2c236a3cc46871ae1f41ba597c84712cb082ba94 Author: Sven Eckelmann sven@narfation.org Date: Sun May 31 10:10:20 2015 +0200
batman-adv: Fix kerneldoc over 80 column lines
Kerneldoc required single line documentation in the past (before 2009). Therefore, the 80 columns limit per line check of checkpatch was disabled for kerneldoc. But kerneldoc is not excluded anymore from it and checkpatch now enabled the check again.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit dc0e68b4adb6b0b665bd3be00e05e9411588d0af Author: Sven Eckelmann sven@narfation.org Date: Tue May 26 18:34:26 2015 +0200
batman-adv: Replace C99 int types with kernel type
(s|u)(8|16|32|64) are the preferred types in the kernel. The use of the standard C99 types u?int(8|16|32|64)_t are objected by some people and even checkpatch now warns about using them.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2be28ed88835ece650678742be1366fcd445bf3b Merge: 243e53b 34124bb Author: Antonio Quartulli antonio@meshcoding.com Date: Fri May 29 09:31:10 2015 +0200
Merge remote-tracking branch 'pkg/next' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
commit 243e53bf3c99a3c92a6e37effda5534a77f40c35 Merge: 89d7f01e a74eab6 Author: Antonio Quartulli antonio@meshcoding.com Date: Fri May 29 09:09:42 2015 +0200
Merge remote-tracking branch 'net-next/master' into merge/master
commit 34124bb9bd89b4a4f802b45e9d2858c7625b7703 Merge: e944023 be22f93 Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Apr 28 20:47:58 2015 +0200
Merge branch 'next'
commit be22f935ba012efb3d32523dbdd460488076c60b Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Apr 28 20:29:53 2015 +0200
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit b6ff92aa334083dee8a1f5f0c5aa0f7c4c2584cf Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Apr 28 20:25:49 2015 +0200
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 97974d727ac062ff8ea919fd316099f2e9264e24 Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Apr 28 20:24:31 2015 +0200
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit e94402357d724e854adc1405f11ce82b26c5d744 Author: Sven Eckelmann sven@narfation.org Date: Thu Apr 23 18:22:25 2015 +0200
batman-adv: Remove unused post-VLAN ethhdr in batadv_gw_dhcp_recipient_get
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e9d11c64d590634aa27355b54de9fafaf3a66dfb Author: Sven Eckelmann sven@narfation.org Date: Thu Apr 23 18:22:24 2015 +0200
batman-adv: Clarify calculation precedence for '&' and '?'
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 098c0f1f0b9a7933e78b73033d951bf90e69d004 Author: Sven Eckelmann sven@narfation.org Date: Tue Apr 21 12:45:08 2015 +0200
batman-adv: Add link to kernel README
The batman-adv out-of-tree module provided a README in the root folder. But the kernel stores the same readme as Documentation/networking/batman-adv.txt. Just link to the kernel README to avoid having the same readme twice.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c69c9353631ac78dcfd52f5493d9390c76f6c661 Author: Sven Eckelmann sven@narfation.org Date: Tue Apr 21 12:45:07 2015 +0200
batman-adv: Add Kconfig to the sources
The Kconfig file is not used by the out-of-tree module but it has to be modified when new patches are added which would modify it in the kernel tree. Otherwise the information has to be stored somewhere else until someone submits it to the Networking maintainer.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit eb696672a075351355b8a77b9394ba70d7acbdd6 Author: Sven Eckelmann sven@narfation.org Date: Tue Apr 21 12:45:06 2015 +0200
batman-adv: Use kernel-like folder structure
The person submitting the patches to the Networking maintainer has to take each patch and move files around and add some files to make it work in the actual kernel tree. Having all files included and already in the correct kernel tree layout should make this a lot easier.
The only files not part of the kernel tree are compat-include and every regular file in the top level directory.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c7f3a86d8c210e8bdda9496ebf1c44179e29a844 Author: Sven Eckelmann sven@narfation.org Date: Thu Apr 23 13:16:36 2015 +0200
batman-adv: update copyright years for 2015 in compat code
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 125d5a81efcb29538b454098a69e5b70f81ee20e Merge: 620c91f 3351c8c Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Apr 26 19:34:40 2015 +0800
Merge branch 'next'
commit 3351c8c21b1a07b66234fd7837f96012fdbad241 Author: Sven Eckelmann sven@narfation.org Date: Thu Apr 23 13:16:35 2015 +0200
batman-adv: update copyright years for 2015
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 620c91f3debcfc4a55d6e53bc16e73da4e40971f Merge: 13f9fdd b492832c Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Apr 22 10:12:06 2015 +0800
Merge branch 'next'
commit b492832c4e56c5fe6d545e3b1fa7e507b4e3e102 Author: Sven Eckelmann sven@narfation.org Date: Tue Apr 21 14:48:56 2015 +0200
batman-adv: Document multicast compile time option
The README.external lists all options which can be enabled/disabled during compile time. The CONFIG_BATMAN_ADV_MCAST option wasn't document in this list.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 13f9fdda0632303932f1776c08c80f971189eca3 Author: Sven Eckelmann sven@narfation.org Date: Fri Apr 17 19:40:30 2015 +0200
batman-adv: Automatically create nested kfree_rcu helper functions
The kfree_rcu compat helper for old kernels require a special function that knows how to calculate the offsets to the actual data pointer to call kfree. These can either be manually provided or the GCC extension for nested functions can be used to automatically create a local function using a macro.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d40162d6e0e2d266914b27c93b255a5a8422ed0f Author: Sven Eckelmann sven@narfation.org Date: Fri Apr 17 19:40:29 2015 +0200
batman-adv: Remove unused IFF_BRIDGE_PORT live patching hack
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 7df6200927271862dea5b66e24b2b08fa6ea7739 Author: Sven Eckelmann sven@narfation.org Date: Fri Apr 17 19:40:28 2015 +0200
batman-adv: Add required includes to all files
The header files could not be build indepdent from each other. This is happened because headers didn't include the files for things they've used. This was problematic because the success of a build depended on the knowledge about the right order of local includes.
Also source files were not including everything they've used explicitly. Instead they required that transitive includes are always stable. This is problematic because some transitive includes are not obvious, depend on config settings and may not be stable in the future.
The order for include blocks are:
* primary headers (main.h and the *.h file of a *.c file) * global linux headers * required local headers * extra forward declarations for pointers in function/struct declarations
The only exceptions are linux/bitops.h and linux/if_ether.h in packet.h. This header file is shared with userspace applications like batctl and must therefore build together with userspace applications. The header linux/bitops.h is not part of the uapi headers and linux/if_ether.h conflicts with the musl implementation of netinet/if_ether.h. The maintainers rejected the use of __KERNEL__ preprocessor checks and thus these two headers are only in main.h. All files using packet.h first have to include main.h to work correctly.
Reported-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5857ad34cd5b114c4f98dab81d994b380a6a29e5 Author: Sven Eckelmann sven@narfation.org Date: Mon Apr 20 18:12:02 2015 +0200
batman-adv: Remove explicit compat.h include and split compat.h
The current approach for the compat layer is to include the compat.h file at exactly the right time to provide additional functionality and to live patch the batman-adv sources. This has the problem that the compat.h file becomes harder to read over time. Also live patching and adding of missing functionality partially conflict. This becomes obvious when the include order in some files is different compared to the one the author of an compat.h entry expected.
A different approach is to inject intermediate header files which add additional features. This allows to reduce the size of compat.h and only leaves the live patching part in it. The compat.h can then added automatically to each compile run before anything else is included. compat.h has therefore the control which headers must be included before the live patching of the batman-adv source can begin.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 9f01c16a4409e43e86629418fae9184fabb59da5 Merge: 141c6e9 e78c16c Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Apr 20 23:27:25 2015 +0800
Merge branch 'next'
commit e78c16c0550c4d058b0c8ae182fe7202e39fd9c4 Author: Sven Eckelmann sven@narfation.org Date: Fri Apr 17 19:18:08 2015 +0200
batman-adv: Revert "fix var name to keep compatibility with old kernels"
The original patch b53915310227cc9b029ba0fa5aae44e50a461f80 should not be submitted to net-next. It can be better implemented using compat code.
Signed-off-by: Sven Eckelmann sven@narfation.org Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 141c6e91c6594c310c53117d45bbafe02fabb958 Merge: 6c0b7de f8a8f60 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Apr 20 11:49:42 2015 +0800
Merge branch 'next'
commit f8a8f6058f797569f917a3735683ff4ff17b4dd4 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Fri Apr 17 19:15:10 2015 +0200
batman-adv: introduce dev_get_iflink()
The goal of this patch is to prepare the removal of the iflink field. It introduces a new ndo function, which will be implemented by virtual interfaces.
There is no functional change into this patch. All readers of iflink field now call dev_get_iflink().
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net [sven@narfation.org: added compat code] Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit aeb0f1d95047e0fd944684f1f6ca707a91b72959 Author: Himangi Saraogi himangi774@gmail.com Date: Fri Apr 17 18:34:18 2015 +0200
batman-adv: Use kasprintf
kasprintf combines kmalloc and sprintf, and takes care of the size calculation itself.
The semantic patch that makes this change is as follows:
// <smpl> @@ expression a,flag; expression list args; statement S; @@
a = - (kmalloc|kzalloc)(...,flag) + kasprintf(flag,args) <... when != a if (a == NULL || ...) S ...> - sprintf(a,args); // </smpl>
Signed-off-by: Himangi Saraogi himangi774@gmail.com Acked-by: Julia Lawall julia.lawall@lip6.fr Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5ba0a6317d750ed2918209686aaf122e736c412e Author: Rasmus Villemoes linux@rasmusvillemoes.dk Date: Fri Apr 17 18:34:17 2015 +0200
batman-adv: replace strnicmp with strncasecmp
The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users.
To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g.
Signed-off-by: Rasmus Villemoes linux@rasmusvillemoes.dk Cc: Marek Lindner mareklindner@neomailbox.ch Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Andrew Morton akpm@linux-foundation.org Signed-off-by: Linus Torvalds torvalds@linux-foundation.org Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6c0b7deb66f7792c31cd9af4479cb3820b320f10 Merge: 16b4833 ab1e599 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Apr 20 11:18:26 2015 +0800
Merge branch 'next'
commit ab1e59954fc69d1577d4465bd95221d6061cfd54 Merge: e36785e 7d28d37 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Apr 20 11:10:04 2015 +0800
Merge branch 'maint' into next
commit 7d28d37061fe1ce8866e84a14806a92a5d3abf11 Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Feb 19 12:03:39 2015 +0800
batman-adv: ignore netdev_set_master() calls on kernels older than 2.6.39
batman-adv calls netdev_master_upper_dev_link() which is replaced with with netdev_set_master() for kernels older than 3.9 via compat.h. Prior to 2.6.39 netdev_set_master() contained Linux bonding calls needed to setup bonding devices. Calling this function from batman-adv leads to unexpected behavior when current batman-adv versions are used on these older kernels.
To fix the situation compat.h now ships its own implementation of netdev_set_master() which does not change the net_dev->master state on kernels older than 2.6.39.
Reported-by: Andreas Pape APape@phoenixcontact.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 16b48332e6b02ec2695c2b908f85dd43d82b970d Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:41 2014 +0100
batman-adv: Remove unnecessary ret variable in algo_register
Remove ret variable and all jumps.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 32a451aaa44c74770057a0d9cb72fcf0fbc241f1 Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:40 2014 +0100
batman-adv: Remove unnecessary ret variable
We can avoid this indirect return variable by directly returning the error values.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 16af73458acad5a6c5350ec337268cbe7c00d789 Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:39 2014 +0100
batman-adv: main, batadv_compare_eth return bool
Declare the returntype of batadv_compare_eth as bool. The function called inside this helper function (ether_addr_equal_unaligned) also uses bool as return value, so there is no need to return int.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a5b709ec61ec0a405df151fb2bf47e8dae04c8ab Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:38 2014 +0100
batman-adv: main, Convert is_my_mac() to bool
It is much clearer to see a bool type as return value than 'int' for functions that are supposed to return true or false.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 8435e41ee1e2ad9189d4a966b94e0e3af58bf418 Author: Sven Eckelmann sven@narfation.org Date: Sun Mar 1 16:56:26 2015 +0100
batman-adv: Remove unnecessary check for orig_ifinfo not NULL
orig_ifinfo is dereferenced multiple times in batadv_iv_ogm_update_seqnos before the check for NULL is done. The function also exists at the beginning when orig_ifinfo would have been NULL. This makes the check at the end unnecessary and only confuses the reader/code analyzers.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit eb923e94eb2668f584227d1032308415f289f87c Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:37 2014 +0100
batman-adv: types, Fix comment on bcast_own
batadv_orig_bat_iv->bcast_own is actually not a bitfield, it is an array. Adjust the comment accordingly.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 956e12ab9abd2f37f11388d7673263df233ca0f4 Author: Antonio Quartulli antonio@open-mesh.com Date: Sun Mar 1 00:50:17 2015 +0800
batman-adv: add bat_neigh_free API
This API has to be used to let any routing protocol free neighbor specific allocated resources
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a915b64c9ee43e78c8fddaea521814c1dd9bab92 Author: Antonio Quartulli antonio@open-mesh.com Date: Sun Mar 1 00:50:16 2015 +0800
batman-adv: split name from variable for uint mesh attributes
Some mesh attributes are behind substructs in the batadv_priv object and for this reason the name cannot be used anymore to refer to them.
This patch allows to specify the variable name where the attribute is stored inside batadv_priv instead of using the name
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 3606e0aa7b16f5d1fa0cdc1ec1dec91f1e649bd1 Author: Sven Eckelmann sven@narfation.org Date: Sun Mar 1 09:46:18 2015 +0100
batman-adv: Use common Jenkins Hash implementation
An unoptimized version of the Jenkins one-at-a-time hash function is used and partially copied all over the code wherever an hashtable is used. Instead the optimized version shared between the whole kernel should be used to reduce code duplication and use better optimized code.
Only the DAT code must use the old implementation because it is used as distributed hash function which has to be common for all nodes.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 11c63faf3a7e7ed5c17c902e8e921bf4f707f59e Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:36 2014 +0100
batman-adv: iv_ogm, fix comment function name
This is a small copy paste fix for batadv_ing_buffer_avg.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 63c15a585d0b95bc86748550d706f5ee64253331 Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:35 2014 +0100
batman-adv: iv_ogm, fix coding style
The kernel coding style says, that there should not be multiple assignments in one row.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d00159aec639311d51fe4cba8c483ab55a0191d4 Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:34 2014 +0100
batman-adv: iv_ogm, Fix dup_status comment
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 3040f9c5c96d5cb9712a55d4ed0d69f04c386614 Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:33 2014 +0100
batman-adv: iv_ogm_orig_update, style, add missin brackets
CodingStyle describes that either none or both branches of a conditional have to have brackets.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 253a6dd74fc7c27349ec0d89522cbaa095ba13e6 Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:32 2014 +0100
batman-adv: iv_ogm_queue_add, Simplify expressions
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a467a767dace62a63652fa757d54c13586054ad8 Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:31 2014 +0100
batman-adv: iv_ogm_aggregate_new, simplify error handling
It is just a bit easier to put the error handling at one place and let multiple error paths use the same calls.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 02c9beefb8a2d23018f6adfdee4efe5161e81361 Merge: 2f9d8a2 e36785e Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Feb 24 00:43:45 2015 +0800
Merge branch 'next'
commit e36785ec715e75d2cc6fa48d0115285d9b9ad583 Author: Joe Perches joe@perches.com Date: Sun Feb 22 13:47:56 2015 -0800
batman-adv: Fix use of seq_has_overflowed()
net-next commit 6d91147d183c ("batman-adv: Remove uses of return value of seq_printf") incorrectly changed the overflow occurred return from -1 to 1. Change it back so that the test of batadv_write_buffer_text's return value in batadv_gw_client_seq_print_text works properly.
Signed-off-by: Joe Perches joe@perches.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2f9d8a204227ab1f485852cc52f8bdb3ccb4ee18 Author: Marek Lindner mareklindner@neomailbox.ch Date: Fri Feb 20 00:02:45 2015 +0800
batman-adv: checkpatch - wrong alignment
Introduced by fe67bb41f0e1647c3b05aeb4b736a1171bff496b ("batman-adv: debugfs, avoid compiling for !DEBUG_FS")
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 442b5467d4d072462505a9650b5271753b18211c Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:30 2014 +0100
batman-adv: iv_ogm_orig_update, remove unnecessary brackets
Remove these unnecessary brackets inside a condition.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f7ac9a404f400e573644c8204e061e0c3934d1db Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:29 2014 +0100
batman-adv: iv_ogm_can_aggregate, code readability
This patch tries to increase code readability by negating the first if block and rearranging some of the other conditional blocks. This way we save an indentation level, we also save some allocation that is not necessary for one of the conditions.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5d4ff51b0705e1b1124c73c1ba3006c261f5f539 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Feb 18 22:19:20 2015 +0800
batman-adv: checkpatch - spaces preferred around that '*'
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4ce865db1b7dcc29acf9405291907a0ac8518883 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Feb 18 22:17:30 2015 +0800
batman-adv: checkpatch - comparison to NULL could be rewritten
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 453dea19a89d84ff5bdf03d70f3269a619eba786 Author: Sven Eckelmann sven@narfation.org Date: Wed Feb 18 18:20:24 2015 +0100
batman-adv: Use safer default config for optional features
The current default settings for optional features in batman-adv seems to be based around the idea that the user only compiles what he requires. They will automatically enabled when they are compiled in. For example the network coding part of batman-adv is by default disabled in the out-of-tree module but will be enabled when the code is compiled during the module build.
But distributions like Debian just enable all features of the batman-adv kernel module and hope that more experimental features or features with possible negative effects have to be enabled using some runtime configuration interface.
The network_coding feature can help in specific setups but also has drawbacks and is not disabled by default in the out-of-tree module. Disabling by default in the runtime config seems to be also quite sane.
The bridge_loop_avoidance is the only feature which is disabled by default but may be necessary even in simple setups. Packet loops may even be created during the initial node setup when this is not enabled. This is different than STP on bridges because mesh is usually used on Adhoc WiFi. Having two nodes (by accident) in the same LAN segment and in the same mesh network is rather common in this situation.
Signed-off-by: Sven Eckelmann sven@narfation.org Acked-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 3f74f359cb7e96bbc68d62e1fc48b04b6efb4ca7 Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Feb 19 12:03:39 2015 +0800
batman-adv: ignore netdev_set_master() calls on kernels older than 2.6.39
batman-adv calls netdev_master_upper_dev_link() which is replaced with with netdev_set_master() for kernels older than 3.9 via compat.h. Prior to 2.6.39 netdev_set_master() contained Linux bonding calls needed to setup bonding devices. Calling this function from batman-adv leads to unexpected behavior when current batman-adv versions are used on these older kernels.
To fix the situation compat.h now ships its own implementation of netdev_set_master() which does not change the net_dev->master state on kernels older than 2.6.39.
Reported-by: Andreas Pape APape@phoenixcontact.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 1b49f8e4ace1d036adffb98042d18c3f3eabacdd Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Feb 18 21:38:01 2015 +0800
batman-adv: IS_ENABLED compat code
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 9081091d55ce814d4885a777cd224ce414361d6d Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Feb 18 17:19:33 2015 +0800
batman-adv: make gen-compat-autoconf.sh POSIX compliant
Reported-by: Martin Müller mail@mueller-martin.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 3de1d1b9d1ee4f5fea77995d1bf217fd3a55d2ae Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:28 2014 +0100
batman-adv: iv_ogm_send_to_if, declare char* as const
This string pointer is later assigned to a constant string, so it should be defined constant at the beginning.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit ca2655ce949bc949592c4aed04cba5d019741770 Merge: ec3b2d9 c7203da Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Feb 18 17:01:55 2015 +0800
Merge branch 'next'
commit c7203da7a3aeec3358e60fe970f2aa654e5ca69c Author: Joe Perches joe@perches.com Date: Mon Feb 16 17:31:39 2015 -0800
batman-adv: Remove uses of return value of seq_printf
This function is soon going to return void so remove the return value use.
Convert the return value to test seq_has_overflowed() instead.
Signed-off-by: Joe Perches joe@perches.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit ec3b2d9af7630a62f1210d73dda84bf7fb0b15f4 Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:27 2014 +0100
batman-adv: iv_ogm_aggr_packet, bool return value
This function returns bool values, so it should be defined to return them instead of the whole int range.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 0cc45699f6f17b3ed3e2542540ca0634f4e20ed8 Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:26 2014 +0100
batman-adv: iv_ogm_iface_enable, direct return values
Directly return error values. No need to use a return variable.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d85718602397552befa7829a52c67ba491d3907c Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:25 2014 +0100
batman-adv: Makefile, Sort alphabetically
The whole Makefile is sorted, just the multicast rule is not at the right position.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 9aef87286bbfac356c3d09dc80d96da015064295 Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:23 2014 +0100
batman-adv: tvlv realloc, move error handling into if block
Instead of hiding the normal function flow inside an if block, we should just put the error handling into the if block.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit fe67bb41f0e1647c3b05aeb4b736a1171bff496b Author: Markus Pargmann mpa@pengutronix.de Date: Fri Dec 26 12:41:18 2014 +0100
batman-adv: debugfs, avoid compiling for !DEBUG_FS
Normally the debugfs framework will return error pointer with -ENODEV for function calls when DEBUG_FS is not set.
batman does not notice this error code and continues trying to create debugfs files and executes more code. We can avoid this code execution by disabling compiling debugfs.c when DEBUG_FS is not set.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 939717ced5fdbe211ecb8a9c93952310df922f6b Author: Sven Eckelmann sven@narfation.org Date: Mon Dec 1 10:37:28 2014 +0100
batman-adv: Use only queued fragments when merging
The fragment queueing code now validates the total_size of each fragment, checks when enough fragments are queued to allow to merge them into a single packet and if the fragments have the correct size. Therefore, it is not required to have any other parameter for the merging function than a list of queued fragments.
This change should avoid problems like in the past when the different skb from the list and the function parameter were mixed incorrectly.
Signed-off-by: Sven Eckelmann sven@narfation.org Acked-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 73c9ecc27ee0e166765bc99440ae464e3ac735da Author: Sven Eckelmann sven@narfation.org Date: Mon Dec 1 10:37:27 2014 +0100
batman-adv: Check total_size when queueing fragments
The fragmentation code was replaced in 9b3eab61754d74a93c9840c296013fe3b4a1b606 ("batman-adv: Receive fragmented packets and merge") by an implementation which handles the queueing+merging of fragments based on their size and the total_size of the non-fragmented packet. This total_size is announced by each fragment. The new implementation doesn't check if the the total_size information of the packets inside one chain is consistent.
This is consistency check is recommended to allow using any of the packets in the queue to decide whether all fragments of a packet are received or not.
Signed-off-by: Sven Eckelmann sven@narfation.org Acked-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 89d7f01ec4e2c4cd6ab603d9d8f4284d9ae32dd7 Author: Markus Pargmann mpa@pengutronix.de Date: Sat Nov 29 19:07:46 2014 +0100
batman-adv: Kconfig, Add missing DEBUG_FS dependency
BATMAN_ADV_DEBUG is using debugfs files for the debugging log. So it depends on DEBUG_FS which is missing as dependency in the Kconfig file.
Signed-off-by: Markus Pargmann mpa@pengutronix.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com
commit 7f8640cb71b1f343c84d990eb1653c56139d5331 Merge: f6ffcca 941eac7 Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Jan 6 09:14:03 2015 +0100
Merge commit '941eac7220c009dacea99a123caee10b56e70bca' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
Conflicts: net/batman-adv/CHANGELOG net/batman-adv/README.external net/batman-adv/compat.h net/batman-adv/main.h
commit f6ffcca6c7faf21969a29d3ef7f05166340736fa Merge: e1b9cf4 a918eb9 Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Jan 6 09:12:52 2015 +0100
Merge remote-tracking branch 'net-next/master' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
Conflicts: net/batman-adv/main.h net/batman-adv/multicast.c net/batman-adv/send.c net/batman-adv/soft-interface.c
commit 941eac7220c009dacea99a123caee10b56e70bca Merge: f68b3cb 9c30c3d Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Jan 5 20:06:43 2015 +0100
Merge branch 'next'
commit 4dfccc931f175545fd2cea456dcfa49015a32ac7 Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Dec 30 02:19:21 2014 +0100
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 9c30c3d46e147ae5ebc2031af57e07dcc57d84c9 Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Dec 30 02:20:14 2014 +0100
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 4245d57cb7408815d53ca0e4a76dda48040578f6 Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Dec 30 02:15:22 2014 +0100
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 08714180b6bc45806d94cb8cca30a31a8a06115f Merge: eddbc3d 21fa264 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Jan 6 01:20:27 2015 +0800
Merge branch 'maint' into next
commit 21fa2647ad4547a48da1166a8fa2f951cd7163e2 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Sat Dec 13 23:32:15 2014 +0100
batman-adv: fix potential TT client + orig-node memory leak
This patch fixes a potential memory leak which can occur once an originator times out. On timeout the according global translation table entry might not get purged correctly. Furthermore, the non purged TT entry will cause its orig-node to leak, too. Which additionally can lead to the new multicast optimization feature not kicking in because of a therefore bogus counter.
In detail: The batadv_tt_global_entry->orig_list holds the reference to the orig-node. Usually this reference is released after BATADV_PURGE_TIMEOUT through: _batadv_purge_orig()-> batadv_purge_orig_node()->batadv_update_route()->_batadv_update_route()-> batadv_tt_global_del_orig() which purges this global tt entry and releases the reference to the orig-node.
However, if between two batadv_purge_orig_node() calls the orig-node timeout grew to 2*BATADV_PURGE_TIMEOUT then this call path isn't reached. Instead the according orig-node is removed from the originator hash in _batadv_purge_orig(), the batadv_update_route() part is skipped and won't be reached anymore.
Fixing the issue by moving batadv_tt_global_del_orig() out of the rcu callback.
Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f68b3cbc18dc1ee882226fbca8f84b93c1f072e5 Merge: d1e5e23 eddbc3d Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Dec 29 21:53:14 2014 +0800
Merge branch 'next'
commit eddbc3d739ddb87111a2c30893e19f3176b6e1a6 Author: Sven Eckelmann sven@narfation.org Date: Mon Dec 1 13:59:44 2014 +0100
batman-adv: Unify fragment size calculation
The fragmentation code was replaced in 9b3eab61754d74a93c9840c296013fe3b4a1b606 ("batman-adv: Receive fragmented packets and merge") by an implementation which can handle up to 16 fragments of a packet. The packet is prepared for the split in fragments by the function batadv_frag_send_packet and the actual split is done by batadv_frag_create.
Both functions calculate the size of a fragment themself. But their calculation differs because batadv_frag_send_packet also subtracts ETH_HLEN. Therefore, the check in batadv_frag_send_packet if a full fragment can be created may return true even when batadv_frag_create cannot create a full fragment.
The function batadv_frag_create doesn't check the size of the skb before splitting it and therefore might try to create a larger fragment than the remaining buffer. This creates an integer underflow and an invalid len is given to skb_split.
Signed-off-by: Sven Eckelmann sven@narfation.org Acked-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d1e5e2353eaa8f81e7d5af85c73a7aa89c2b824e Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Nov 2 11:29:57 2014 +0100
batman-adv: remove useless return at the of a void function
Reported-by: checkpatch Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit ecf7f4967bae8baaad6d134291dc8aad7148253f Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Nov 2 11:29:56 2014 +0100
batman-adv: fix misspelled words
Reported-by: checkpatch Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit b609f2633565303738d115561983dc3567d25ab6 Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Oct 19 19:59:41 2014 +0200
batman-adv: move misplaced compat code
consume_skb() has to be re-defined only for kernels <2.6.30 but the macro was accidentally placed right above any #ifdef block causing the function to be always redefined.
Fix this by moving the macro to the proper #ifdef block.
Introduced by: 15fb0fab51a3695738f65dfaab045e979fc89dce ("batman-adv add compat code for consume_skb")
Reported-by: Sven Eckelmann sven@narfation.org Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 21f67dfe579b619254aa76281385a0bf93a43600 Merge: 650251a a053f89 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Dec 8 11:40:38 2014 +0800
Merge branch 'next'
commit a053f89ad8acc371c2eb04ccc7ac1f7f3763c98e Merge: 5105158 210a3cb Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Dec 8 11:39:42 2014 +0800
Merge branch 'maint' into next
commit 210a3cb5a5e09f0067386fd07b3a7a843fcf66c5 Author: Sven Eckelmann sven@narfation.org Date: Mon Dec 1 10:32:10 2014 +0100
batman-adv: Calculate extra tail size based on queued fragments
The fragmentation code was replaced in 9b3eab61754d74a93c9840c296013fe3b4a1b606 ("batman-adv: Receive fragmented packets and merge"). The new code provided a mostly unused parameter skb for the merging function. It is used inside the function to calculate the additionally needed skb tailroom. But instead of increasing its own tailroom, it is only increasing the tailroom of the first queued skb. This is not correct in some situations because the first queued entry can be a different one than the parameter.
An observed problem was:
1. packet with size 104, total_size 1464, fragno 1 was received - packet is queued 2. packet with size 1400, total_size 1464, fragno 0 was received - packet is queued at the end of the list 3. enough data was received and can be given to the merge function (1464 == (1400 - 20) + (104 - 20)) - merge functions gets 1400 byte large packet as skb argument 4. merge function gets first entry in queue (104 byte) - stored as skb_out 5. merge function calculates the required extra tail as total_size - skb->len - pskb_expand_head tail of skb_out with 64 bytes 6. merge function tries to squeeze the extra 1380 bytes from the second queued skb (1400 byte aka skb parameter) in the 64 extra tail bytes of skb_out
Instead calculate the extra required tail bytes for skb_out also using skb_out instead of using the parameter skb. The skb parameter is only used to get the total_size from the last received packet. This is also the total_size used to decide that all fragments were received.
Reported-by: Philipp Psurek philipp.psurek@gmail.com Signed-off-by: Sven Eckelmann sven@narfation.org Acked-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 650251ace02c10adcc1ee22b4b53a9be740528b9 Merge: c1fa40d 5105158 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Nov 17 19:07:55 2014 +0800
Merge branch 'next'
commit 51051581c70dded5f1c2eed594bfd40b09e35353 Merge: b04458b cb2b79e Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Nov 17 19:07:42 2014 +0800
Merge branch 'maint' into next
commit cb2b79e4dfd215cc53f3cd55afb15a6b69e5bcfc Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Sep 20 18:22:05 2014 +0200
batman-adv: avoid NULL dereferences and fix if check
Gateway having bandwidth_down equal to zero are not accepted at all and so never added to the Gateway list. For this reason checking the bandwidth_down member in batadv_gw_out_of_range() is useless.
This is probably a copy/paste error and this check was supposed to be "!gw_node" only. Moreover, the way the check is written now may also lead to a NULL dereference.
Fix this by rewriting the if-condition properly.
Introduced by 0853ec7fafe0a195754454832993c6b35e22b842 ("batman-adv: tvlv - gateway download/upload bandwidth container")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Reported-by: David Binderman dcb314@hotmail.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c1fa40d408be51d0051a7be546417694ac947045 Merge: 8dfbd63 b04458b Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Nov 16 16:56:03 2014 +0800
Merge branch 'next'
commit b04458b1f2a8f5778dd65464e703c1fe42648c23 Merge: df768d7 9e9d48e Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Nov 16 16:55:43 2014 +0800
Merge branch 'maint' into next
commit 9e9d48e829cd93ffbb5ced323caf046ebe963394 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Thu Oct 30 05:40:47 2014 +0100
batman-adv: fix multicast counter when purging originators
When purging an orig_node we should only decrease counter tracking the number of nodes without multicast optimizations support if it was increased through this orig_node before.
A not yet quite initialized orig_node (meaning it did not have its turn in the mcast-tvlv handler so far) which gets purged would not adhere to this and will lead to a counter imbalance.
Fixing this by adding a check whether the orig_node is mcast-initalized before decreasing the counter in the mcast-orig_node-purging routine.
Introduced by 77ec494490d60d89b42cd01d5dbf8dee04503623 ("batman-adv: Announce new capability via multicast TVLV")
Reported-by: Tobias Hachmer tobias@hachmer.de Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 33fdd2cb9fe20d90bc6bff369c9b57e849b317b6 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Thu Oct 30 05:40:46 2014 +0100
batman-adv: fix counter for multicast supporting nodes
A miscounting of nodes having multicast optimizations enabled can lead to multicast packet loss in the following scenario:
If the first OGM a node receives from another one has no multicast optimizations support (no multicast tvlv) then we are missing to increase the counter. This potentially leads to the wrong assumption that we could safely use multicast optimizations.
Fixings this by increasing the counter if the initial OGM has the multicast TVLV unset, too.
Introduced by 77ec494490d60d89b42cd01d5dbf8dee04503623 ("batman-adv: Announce new capability via multicast TVLV")
Reported-by: Tobias Hachmer tobias@hachmer.de Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 8dfbd638dcaa06347b4cc1c64bcc275dc5e87fb6 Merge: e7ba36c df768d7 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Nov 16 13:50:05 2014 +0800
Merge branch 'next'
commit df768d79b9b2e5730e7474e7146af08434709574 Author: Tom Gundersen teg@jklm.no Date: Mon Jul 21 15:42:05 2014 +0200
net: set name_assign_type in alloc_netdev()
Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert all users to pass NET_NAME_UNKNOWN.
Coccinelle patch:
@@ expression sizeof_priv, name, setup, txqs, rxqs, count; @@
( -alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs) +alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs) | -alloc_netdev_mq(sizeof_priv, name, setup, count) +alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count) | -alloc_netdev(sizeof_priv, name, setup) +alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup) )
v9: move comments here from the wrong commit
Signed-off-by: Tom Gundersen teg@jklm.no Reviewed-by: David Herrmann dh.herrmann@gmail.com Signed-off-by: David S. Miller davem@davemloft.net [sw: added compat code] Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e7ba36c4ec9c8b4334a23fd5986306deca726b70 Author: Martin Hundebøll martin@hundeboll.net Date: Tue Nov 11 16:22:23 2014 +0100
batman-adv: fix lock class for decoding hash in network-coding.c
batadv_has_set_lock_class() is called with the wrong hash table as first argument (probably due to a copy-paste error), which leads to false positives when running with lockdep.
Introduced-by: 612d2b4fe0a1ff2f8389462a6f8be34e54124c05 ('batman-adv: network coding - save overheard and tx packets for decoding')
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 428493b16ca8989b8f8d34fa2ad2bf1a19342a61 Merge: 882d728 604adeb Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Nov 9 12:54:40 2014 +0800
Merge branch 'next'
commit 604adeba4a10fdfdab6389babf28d173c21b5abc Merge: 44c3396 9ed2fc7 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Nov 9 12:53:55 2014 +0800
Merge branch 'maint' into next
commit 9ed2fc77a4f0ec36bdb7f56929f6af45a5abb173 Author: Martin Hundebøll martin@hundeboll.net Date: Wed Sep 17 08:56:19 2014 +0200
batman-adv: clear control block of received socket buffers
Since other network components (and some drivers) uses the control block provided in skb's, the network coding feature might wrongly assume that an SKB has been decoded, and thus not try to code it with another packet again. This happens for instance when batman-adv is running on a bridge device.
Fix this by clearing the control block for every received SKB.
Introduced by 3c12de9a5c756b23fe7c9ab332474ece1568914c ("batman-adv: network coding - code and transmit packets if possible") Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 882d728c4e7c7ddcb4903bd1063ea16f98583942 Merge: 318b5ee 44c3396 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Nov 9 12:47:18 2014 +0800
Merge branch 'next'
commit 44c3396e124eb1cd0dd2e67dd43155284f7841ee Merge: ea96df5 8a2ad52 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Nov 9 12:47:02 2014 +0800
Merge branch 'maint' into next
commit 8a2ad520467402d4fa9f2e5ba105597a9fc37347 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Thu Oct 30 06:23:40 2014 +0100
batman-adv: fix delayed foreign originator recognition
Currently it can happen that the reception of an OGM from a new originator is not being accepted. More precisely it can happen that an originator struct gets allocated and initialized (batadv_orig_node_new()), even the TQ gets calculated and set correctly (batadv_iv_ogm_calc_tq()) but still the periodic orig_node purging thread will decide to delete it if it has a chance to jump between these two function calls.
This is because batadv_orig_node_new() initializes the last_seen value to zero and its caller (batadv_iv_ogm_orig_get()) makes it visible to other threads by adding it to the hash table already. batadv_iv_ogm_calc_tq() will set the last_seen variable to the correct, current time a few lines later but if the purging thread jumps in between that it will think that the orig_node timed out and will wrongly schedule it for deletion already.
If the purging interval is the same as the originator interval (which is the default: 1 second), then this game can continue for several rounds until the random OGM jitter added enough difference between these two (in tests, two to about four rounds seemed common).
Fixing this by initializing the last_seen variable of an orig_node to the current time before adding it to the hash table.
Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 318b5eeadee4542269586feaebbad1b0fad79e02 Merge: 99aed11 ea96df5 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Nov 9 12:34:50 2014 +0800
Merge branch 'next'
commit ea96df5e8cebbd835cbbe827660365197a1828c9 Merge: 8353fd1 1e4a96a Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Nov 9 12:34:03 2014 +0800
Merge branch 'maint' into next
commit 1e4a96a4cfdfdf57fecacf1c8fa493345a9fcc03 Author: Sven Eckelmann sven@narfation.org Date: Mon Nov 3 23:16:19 2014 +0100
batman-adv: Fix double fetch in RCU version of hlist_*entry*
The backported (<3.9) version of hlist_for_each_entry_rcu and hlist_for_each_entry_safe uses the new macro hlist_entry_safe. It is called with an ACCESS_ONCE parameter for the first parameter ptr. This disallows merging of the two loads which the current version of the macro uses.
This is problematic because this macro must only generate one load. Otherwise with two contexts (or CPUs) following could happen:
1. context 1 fetches the ptr to the last entry in hlist_entry_safe() and accepts this non-NULL ptr
2. context 2 deletes the last entry and terminates the list with NULL
3. context 1 re-fetches the pointer, doesn't check for zero, calculates the entry based on a NULL pointer
4. context 1 crashes because it tries to load/write data from/to the invalid address
Instead use a single load to a temporary variable and do the NULL-check and calculation based on that one.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 99aed11d7c0e2c09bbc5f53fc5053aa47dcf6fbe Merge: 47dc789 8353fd1 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Nov 9 12:32:32 2014 +0800
Merge branch 'next'
commit 8353fd1a6d4216a027c75fc3bb73b08ad1d55ef3 Author: Ken Helias kenhelias@firemail.de Date: Fri Aug 15 13:38:47 2014 +0200
list: fix order of arguments for hlist_add_after(_rcu)
All other add functions for lists have the new item as first argument and the position where it is added as second argument. This was changed for no good reason in this function and makes using it unnecessary confusing.
The name was changed to hlist_add_behind() to cause unconverted code to generate a compile error instead of using the wrong parameter order.
[akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Ken Helias kenhelias@firemail.de Cc: "Paul E. McKenney" paulmck@linux.vnet.ibm.com Acked-by: Jeff Kirsher jeffrey.t.kirsher@intel.com [intel driver bits] Cc: Hugh Dickins hughd@google.com Cc: Christoph Hellwig hch@infradead.org Signed-off-by: Andrew Morton akpm@linux-foundation.org Signed-off-by: Linus Torvalds torvalds@linux-foundation.org [sven@narfation.org: fix parameter order, add compat code] Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 47dc789e7f949b74eef810ca3b48dd2fac0402bf Author: Simon Wunderlich sw@simonwunderlich.de Date: Wed Aug 13 14:26:56 2014 +0200
batman-adv: fix and simplify condition when bonding should be used
The current condition actually does NOT consider bonding when the interface the packet came in from is the soft interface, which is the opposite of what it should do (and the comment describes). Fix that and slightly simplify the condition.
Reported-by: Ray Gibson booray@gmail.com Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit dac27f80c3725434050c0238f8b6930e85283c16 Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Sep 1 14:37:29 2014 +0200
batman-adv: checkpatch - remove unnecessary parentheses
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 873d798c7769eb1f26504af3410853a388b16767 Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Sep 1 14:37:28 2014 +0200
batman-adv: checkpatch - Please don't use multiple blank lines
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 55c2fe7a9ec7d5b304c6a1c2ff21d30fad0671fe Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Sep 1 14:37:27 2014 +0200
batman-adv: checkpatch - Please use a blank line after declarations
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit b32044a6283b150feb017b4416be4ce193c74795 Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Sep 1 14:37:26 2014 +0200
batman-adv: checkpatch - No space is necessary after a cast
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6948dace1e103b96351512fd79595c6d1ca0f13c Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Sep 1 14:37:25 2014 +0200
batman-adv: checkpatch - else is not generally useful after a break or return
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 84f23eac03bb3f8dfc81b2a9e2b118a4810ac7ef Author: Martin Hundebøll martin@hundeboll.net Date: Tue Jul 15 09:41:08 2014 +0200
batman-adv: kernel doc fixes for main.{c, h}
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6369d95e1f55770338ae9e34cf86666022b8fe93 Author: Martin Hundebøll martin@hundeboll.net Date: Tue Jul 15 09:41:07 2014 +0200
batman-adv: kernel doc fix for distributed-arp-table.h
Signed-off-by: Martin Hundebøll martin@hundeboll.net Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 69f6547ecf5e5ba4a186d502bb49432cfb5c60b3 Author: Martin Hundebøll martin@hundeboll.net Date: Tue Jul 15 09:41:06 2014 +0200
batman-adv: kernel doc fixes for bridge_loop_avoidance.c
Signed-off-by: Martin Hundebøll martin@hundeboll.net Acked-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 21b6feccc16730a146cd1d5a8e41cff988fc4633 Author: Martin Hundebøll martin@hundeboll.net Date: Tue Jul 15 09:41:05 2014 +0200
batman-adv: kernel doc fixes for bat_iv_ogm.c
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit be0f6de26a0b96ac56db0bcc81cf5a1adc660cd6 Author: Simon Wunderlich sw@simonwunderlich.de Date: Wed Jul 16 12:23:10 2014 +0200
batman-adv: remove obsolete variable primary_iface from orig_node
This variable became obsolete when changing to the new bonding mechanism based on the multi interface optimization. Since its not used anywhere, remove it.
Reported-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 365deac8a83d08e67dad3d52a6e3e0aa92f78d68 Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Jul 21 10:03:59 2014 +0200
batman-adv: avoid useless return in void functions
Cc: Linus Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e37047307eb8534d533e8a31fdc1e3ab0ed08179 Author: Jean Sacren sakiwit@gmail.com Date: Thu Aug 7 06:50:46 2014 -0600
batman: fix duplicate #include of multicast.h
The header multicast.h was included twice, so delete one of them.
Signed-off-by: Jean Sacren sakiwit@gmail.com Cc: Marek Lindner mareklindner@neomailbox.ch Cc: Simon Wunderlich sw@simonwunderlich.de Cc: Antonio Quartulli antonio@meshcoding.com Cc: b.a.t.m.a.n@lists.open-mesh.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2264f8ad0c64bcf74167e58d7e97378f2f18d824 Merge: 6ae4281 0c1c04b Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Jul 22 15:46:25 2014 +0200
Merge remote-tracking branch 'origin/next'
commit 0c1c04b05b8a256c538ec077a421d63de200064a Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Jul 21 16:05:35 2014 +0200
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 544bf5abb1972bf1953d29e5ddbe343e2c02418c Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Jul 21 16:05:03 2014 +0200
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit ad6a70e50c31c9f4031e6e9bb12464a7d02a2a13 Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Jul 21 16:04:48 2014 +0200
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 6ae4281474675fbca5bedcf768972a32db586eb6 Merge: 7644650 11be1ac Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jun 30 14:12:59 2014 +0800
Merge branch 'next'
commit 11be1ac9cacdf843cdaaa0ae9f4dfe7206ac6d35 Author: Cong Wang cwang@twopensource.com Date: Thu May 22 11:57:17 2014 -0700
batman-adv: fix a bogus warning from batadv_is_on_batman_iface()
batman tries to search dev->iflink to check if it's a batman interface, but ->iflink could be 0, which is not a valid ifindex. It should just avoid iflink == 0 case.
Reported-by: Jet Chen jet.chen@intel.com Tested-by: Jet Chen jet.chen@intel.com Cc: David S. Miller davem@davemloft.net Cc: Steffen Klassert steffen.klassert@secunet.com Cc: Antonio Quartulli antonio@open-mesh.com Cc: Marek Lindner mareklindner@neomailbox.ch Signed-off-by: Cong Wang xiyou.wangcong@gmail.com Signed-off-by: Cong Wang cwang@twopensource.com Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e1b9cf4b021b60f664ece222c47b1c7b3c38d7d2 Merge: 150985e 8cd753e Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Jun 29 01:25:34 2014 +0200
Merge commit '8cd753ef306c2273d0da3aff5df758880ca78e32' into merge/master
commit 7644650bb766bd4c7b6be5d97e6b1c3ed93a38d7 Author: Simon Wunderlich simon@open-mesh.com Date: Tue Jun 17 12:16:03 2014 +0200
batman-adv: increase default hop penalty
The default hop penalty is currently set to 15, which is applied like that for multi interface devices (e.g. dual band APs). Single band devices will still use an effective penalty of 30 (hop penalty + wifi penalty).
After receiving reports of too long paths in mesh networks with dual band APs which were fixed by increasing the hop penalty, we'd like to suggest to increase that default value in the default setting as well. We've evaluated that increase in a handful of medium sized mesh networks (5-20 nodes) with single and dual band devices, with changes for the better (shorter routes, higher throughput) or no change at all.
This patch changes the hop penalty to 30, which will give an effective penalty of 60 on single band devices (hop penalty + wifi penalty).
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 7de3b43302cc971666fb6526e328659ab04f633e Merge: 8c12d63 8cd753e Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Jun 24 23:28:45 2014 +0800
Merge branch 'next'
commit 8cd753ef306c2273d0da3aff5df758880ca78e32 Author: Simon Wunderlich simon@open-mesh.com Date: Mon Jun 23 15:55:36 2014 +0200
batman-adv: drop QinQ claim frames in bridge loop avoidance
Since bridge loop avoidance only supports untagged or simple 802.1q tagged VLAN claim frames, claim frames with stacked VLAN headers (QinQ) should be detected and dropped. Transporting the over the mesh may cause problems on the receivers, or create bogus entries in the local tt tables.
Reported-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 8c12d63dfa38f41feb7f93dd2a34ce2b26900c7b Author: Octavian Purdila octavian.purdila@intel.com Date: Fri Jun 13 11:27:14 2014 +0200
batman-adv: add __pskb_copy_fclone and pskb_copy_for_clone
There are several instances where a pskb_copy or __pskb_copy is immediately followed by an skb_clone.
Add a couple of new functions to allow the copy skb to be allocated from the fclone cache and thus speed up subsequent skb_clone calls.
Cc: Alexander Smirnov alex.bluesman.smirnov@gmail.com Cc: Dmitry Eremin-Solenikov dbaryshkov@gmail.com Cc: Marek Lindner mareklindner@neomailbox.ch Cc: Simon Wunderlich sw@simonwunderlich.de Cc: Antonio Quartulli antonio@meshcoding.com Cc: Marcel Holtmann marcel@holtmann.org Cc: Gustavo Padovan gustavo@padovan.org Cc: Johan Hedberg johan.hedberg@gmail.com Cc: Arvid Brodin arvid.brodin@alten.se Cc: Patrick McHardy kaber@trash.net Cc: Pablo Neira Ayuso pablo@netfilter.org Cc: Jozsef Kadlecsik kadlec@blackhole.kfki.hu Cc: Lauro Ramos Venancio lauro.venancio@openbossa.org Cc: Aloisio Almeida Jr aloisio.almeida@openbossa.org Cc: Samuel Ortiz sameo@linux.intel.com Cc: Jon Maloy jon.maloy@ericsson.com Cc: Allan Stephens allan.stephens@windriver.com Cc: Andrew Hendry andrew.hendry@gmail.com Cc: Eric Dumazet edumazet@google.com Reviewed-by: Christoph Paasch christoph.paasch@uclouvain.be Signed-off-by: Octavian Purdila octavian.purdila@intel.com Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c38939def809be2b6b76458e3975698969a046bf Author: Antonio Quartulli antonio@meshcoding.com Date: Fri Jun 13 11:21:09 2014 +0200
batman-adv: add compat code for kmalloc_array()
kmalloc_array() was introduced with linux-3.4 therefore we need some compat code in order to be able to compile batman-adv against older kernels.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 11b7925e5f361df602cf3d9546605fed984cbc23 Author: André Gaul gaul@web-yard.de Date: Tue Jun 10 17:50:31 2014 +0200
batman-adv: remove unnecessary logspam
This patch removes unnecessary logspam which resulted from superfluous calls to net_ratelimit(). With the supplied patch, net_ratelimit() is called after the loglevel has been checked.
Signed-off-by: André Gaul gaul@web-yard.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4c525d3a74b4fdadf30232885fbfea704915f81f Author: Sven Eckelmann sven@narfation.org Date: Mon May 26 17:21:39 2014 +0200
batman-adv: Fix out-of-order fragmentation support
batadv_frag_insert_packet was unable to handle out-of-order packets because it dropped them directly. This is caused by the way the fragmentation lists is checked for the correct place to insert a fragmentation entry.
The fragmentation code keeps the fragments in lists. The fragmentation entries are kept in descending order of sequence number. The list is traversed and each entry is compared with the new fragment. If the current entry has a smaller sequence number than the new fragment then the new one has to be inserted before the current entry. This ensures that the list is still in descending order.
An out-of-order packet with a smaller sequence number than all entries in the list still has to be added to the end of the list. The used hlist has no information about the last entry in the list inside hlist_head and thus the last entry has to be calculated differently. Currently the code assumes that the iterator variable of hlist_for_each_entry can be used for this purpose after the hlist_for_each_entry finished. This is obviously wrong because the iterator variable is always NULL when the list was completely traversed.
Instead the information about the last entry has to be stored in a different variable.
This problem was introduced in 9b3eab61754d74a93c9840c296013fe3b4a1b606 ("batman-adv: Receive fragmented packets and merge").
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d979cae85e6b9285572d600e5e26652b3120f7d2 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat May 24 06:43:47 2014 +0200
batman-adv: prefer kmalloc_array to kmalloc when possible
Reported by checkpatch with the following warning: WARNING: Prefer kmalloc_array over kmalloc with multiply
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 150985e7766f4864b025efc3c5fac8b922d371e2 Merge: 0a1689d b34590b Author: Antonio Quartulli antonio@meshcoding.com Date: Sun May 18 14:54:46 2014 +0200
Merge commit 'b34590b05cd6f67def14b126b2ea6bc9692776b6' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
Conflicts: net/batman-adv/CHANGELOG net/batman-adv/README.external
commit b34590b05cd6f67def14b126b2ea6bc9692776b6 Merge: f95ce71 5bd2cac Author: Simon Wunderlich sw@simonwunderlich.de Date: Fri May 16 15:50:21 2014 +0200
Merge remote-tracking branch 'origin/next'
commit 5bd2cac4fa26f87552e56a0770d38f78fcdcd4bd Author: Simon Wunderlich sw@simonwunderlich.de Date: Fri May 16 13:30:45 2014 +0200
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 6e389cccf01c350e5c4666a7f72fb08db175fd91 Author: Simon Wunderlich sw@simonwunderlich.de Date: Thu May 15 19:37:20 2014 +0200
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 3307940c0c64d25c4d0e49049b94df69dc0ad31e Author: Simon Wunderlich sw@simonwunderlich.de Date: Thu May 15 19:36:36 2014 +0200
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit f95ce7131746c65fbcdffcf2089cab59e2c2f7ac Author: Antonio Quartulli antonio@meshcoding.com Date: Thu May 15 11:24:26 2014 +0200
batman-adv: remove semi-colon after macro definition
Reported by checkpatch with the following warning: "WARNING: macros should not use a trailing semicolon"
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 23d38d4afc0e49d1b6f358b0af173a29179f714c Merge: cf7a3b7 5b3eab9 Author: Marek Lindner mareklindner@neomailbox.ch Date: Fri May 16 02:58:42 2014 +0800
Merge branch 'next'
commit 5b3eab94367eb94b8cff8af053e3c7465374a818 Merge: a1b1426 b539153 Author: Marek Lindner mareklindner@neomailbox.ch Date: Fri May 16 02:57:27 2014 +0800
Merge branch 'maint' into next
commit b53915310227cc9b029ba0fa5aae44e50a461f80 Author: Antonio Quartulli antonio@meshcoding.com Date: Thu May 15 11:08:07 2014 +0200
batman-adv: fix var name to keep compatibility with old kernels
The first argument of kfree_rcu() is used in compat.h to forge a function name used by old kernels. Keep it as it was before to avoid breaking this compat mechanism.
Introduced by 9729d2085c0fa4398eb1ee518b0097866dfdcd77 ("batman-adv: fix TT VLAN inconsistency on VLAN re-add")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit bc089ef4b36b6633cf38a6a4fa4bea9ff2b2965d Author: Antonio Quartulli antonio@meshcoding.com Date: Thu May 15 11:08:06 2014 +0200
batman-adv: fix alignment
Introduced by 9729d2085c0fa4398eb1ee518b0097866dfdcd77 ("batman-adv: fix TT VLAN inconsistency on VLAN re-add")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 0a1689da7bfc32d9f6caa581af41b560fd1e164f Merge: ac44ee3 a1b1426 Author: Antonio Quartulli antonio@meshcoding.com Date: Thu May 15 19:14:55 2014 +0200
Merge commit 'a1b142620c8dad5e75fbb615925fb76846b5d45d' into merge/master
commit cf7a3b7465d1b1d2a3d23cd6b26da4dff0a9f6c1 Merge: 82febf6 a1b1426 Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu May 15 05:16:44 2014 +0800
Merge branch 'next'
commit a1b142620c8dad5e75fbb615925fb76846b5d45d Merge: 7ace0eb8 236e603 Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu May 15 05:16:19 2014 +0800
Merge branch 'maint' into next
commit 236e60395e67b8311185cf932a899898773c6210 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed May 14 14:23:15 2014 +0200
batman-adv: fix typ0 in kerneldoc and comment
Introduced by 9b9cdbe28e2b9c8bdf9c761f22ba9655963d13d4 ("batman-adv: fix removing neigh_ifinfo")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Reported-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 82febf64a28c2a845c73930744877638c5ef71f4 Merge: 86469da 7ace0eb8 Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu May 15 04:46:33 2014 +0800
Merge branch 'next'
commit 7ace0eb8277cedde2bd0f1d0499ed84de63c758a Merge: 9d48399 9729d20 Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu May 15 04:43:37 2014 +0800
Merge branch 'maint' into next
Conflicts: translation-table.c
commit 9729d2085c0fa4398eb1ee518b0097866dfdcd77 Author: Antonio Quartulli antonio@open-mesh.com Date: Thu May 8 17:13:15 2014 +0200
batman-adv: fix TT VLAN inconsistency on VLAN re-add
When a VLAN interface (on top of batX) is removed and re-added within a short timeframe TT does not have enough time to properly cleanup. This creates an internal TT state mismatch as the newly created softif_vlan will be initialized from scratch with a TT client count of zero (even if TT entries for this VLAN still exist). The resulting TT messages are bogus due to the counter / tt client listing mismatch, thus creating inconsistencies on every node in the network
To fix this issue destroy_vlan() has to not free the VLAN object immediately but it has to be kept alive until all the TT entries for this VLAN have been removed. destroy_vlan() still removes the sysfs folder so that the user has the feeling that everything went fine.
If the same VLAN is re-added before the old object is free'd, then the latter is resurrected and re-used.
Implement such behaviour by increasing the reference counter of a softif_vlan object every time a new local TT entry for such VLAN is created and remove the object from the list only when all the TT entries have been destroyed.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 86469da4eacf7844dcb1cfb7d089cfbe44f30aac Author: Wilfried Klaebe w-lkml@lebenslange-mailadresse.de Date: Wed May 14 19:54:35 2014 +0800
batman-adv: get rid of SET_ETHTOOL_OPS
Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that.
Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops;
Compile tested only, but I'd seriously wonder if this broke anything.
Suggested-by: Dave Miller davem@davemloft.net Signed-off-by: Wilfried Klaebe w-lkml@lebenslange-mailadresse.de
commit d1af3f2196fa598b0a71211a7dc7e071d6a20c0b Merge: 869a0e5 9d48399 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed May 14 19:49:15 2014 +0800
Merge branch 'next'
commit 9d48399862a6d818edee737073d26cac15500996 Merge: 9fb6f30 f8d343a Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed May 14 19:47:54 2014 +0800
Merge branch 'maint' into next
commit f8d343af6f81dfdef17d8341fca5cf4b1cb44db9 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat May 10 17:58:03 2014 +0200
batman-adv: break line longer than 80chars
Introduced by 9b9cdbe28e2b9c8bdf9c761f22ba9655963d13d4 ("batman-adv: fix removing neigh_ifinfo")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 869a0e57115d4fcf131e5f5a03e03637d2c60bb2 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat May 10 18:56:37 2014 +0200
batman-adv: add blank line between declarations and the rest of the code
Reported by checkpatch with the following message: "WARNING: Missing a blank line after declarations"
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit ac44ee35fb889d6348f5b51cc832d906810c2453 Merge: e01abef 9fb6f30 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat May 10 10:07:55 2014 +0200
Merge commit '9fb6f304db4c7d82c72f49f759ae58fc745750e8' into merge/master
commit 9fb6f304db4c7d82c72f49f759ae58fc745750e8 Merge: 06566d8 8dbdee5 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon May 5 00:21:18 2014 +0800
Merge branch 'maint' into next
commit 8dbdee55810adceecf51548d44da893076c99219 Author: Antonio Quartulli antonio@open-mesh.com Date: Fri May 2 01:35:13 2014 +0200
batman-adv: increase orig refcount when storing ref in gw_node
A pointer to the orig_node representing a bat-gateway is stored in the gw_node->orig_node member, but the refcount for such orig_node is never increased. This leads to memory faults when gw_node->orig_node is accessed and the originator has already been freed.
Fix this by increasing the refcount on gw_node creation and decreasing it on gw_node free.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 06566d8dbaa63027fc0cf3bb0b111558d3903326 Merge: be45ab5 113f264 Author: Marek Lindner mareklindner@neomailbox.ch Date: Fri May 2 13:16:00 2014 +0800
Merge branch 'maint' into next
commit 113f264b60bc4f50011a8f736d74f91ff7da11f1 Author: Antonio Quartulli antonio@open-mesh.com Date: Wed Apr 23 14:05:16 2014 +0200
batman-adv: fix reference counting imbalance while sending fragment
In the new fragmentation code the batadv_frag_send_packet() function obtains a reference to the primary_if, but it does not release it upon return.
This reference imbalance prevents the primary_if (and then the related netdevice) to be properly released on shut down.
Fix this by releasing the primary_if in batadv_frag_send_packet().
Introduced by db56e4ecf5c2b179a0101138eacc2ec52b6ef45d ("batman-adv: Fragment and send skbs larger than mtu")
Cc: Martin Hundebøll martin@hundeboll.net Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Martin Hundebøll martin@hundeboll.net
commit be45ab56df4830a0f2698e948b63807a39abb64d Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Apr 24 03:41:26 2014 +0800
batman-adv: fix NULL pointer dereferences
Was introduced with 45dab5f5509023946793fc9d1d0566c12ca8bb52 ("batman-adv: fix more code style")
Reported-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Linus Lüssing linus.luessing@web.de
commit 0563fda54396e95a23af4e845df298b642715a2b Merge: b08dc3d 2ac2c94 Author: Marek Lindner mareklindner@neomailbox.ch Date: Fri May 2 13:06:52 2014 +0800
Merge branch 'maint' into next
commit 2ac2c94590d49e69ad8400a9df959533195143ed Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Apr 24 03:44:25 2014 +0800
batman-adv: fix indirect hard_iface NULL dereference
If hard_iface is NULL and goto out is made batadv_hardif_free_ref() doesn't check for NULL before dereferencing it to get to refcount.
Introduced in f13f960797fd1969b3c0470cc97435ddfb6aecb4 ("batman-adv: add debugfs support to view multiif tables").
Reported-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch Acked-by: Antonio Quartulli antonio@meshcoding.com
commit 31f391475cc08724e96ab060ef4aa6503d11da8e Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Mar 31 13:48:10 2014 +0200
batman-adv: change the MAC of each VLAN upon ndo_set_mac_address
The MAC address of the soft-interface is used to initialise the "non-purge" TT entry of each existing VLAN. Therefore when the user invokes ndo_set_mac_address() all the "non-purge" TT entries have to be updated, not only the one belonging to the non-tagged network.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 1c2e700fa93e6de3a2ae3725cf437504683b894a Author: Antonio Quartulli antonio@open-mesh.com Date: Sat Mar 29 17:27:38 2014 +0100
batman-adv: fix local TT check for outgoing arp requests in DAT
Change introduced by d6bd8b36fa1f3d72a6fd5942a6e9bde6ddafcd0d ("batman-adv: make DAT drop ARP requests targeting local clients") implements a check that prevents DAT from using the caching mechanism when the client that is supposed to provide a reply to an arp request is local.
However change brought by 3e26722bc9f248ec4316749fc1957365c0fa5e4b ("batman-adv: make the Distributed ARP Table vlan aware") has not converted the above check into its vlan aware version thus making it useless when the local client is behind a vlan.
Fix the behaviour by properly specifying the vlan when checking for a client being local or not.
Reported-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 9b9cdbe28e2b9c8bdf9c761f22ba9655963d13d4 Author: Simon Wunderlich simon@open-mesh.com Date: Wed Mar 26 15:46:24 2014 +0100
batman-adv: fix removing neigh_ifinfo
When an interface is removed separately, all neighbors need to be checked if they have a neigh_ifinfo structure for that particular interface. If that is the case, remove that ifinfo so any references to a hard interface can be freed.
This is a regression introduced by 9bb33b8d88e318c4879d37d06ad28e3e018b9036 ("batman-adv: split tq information in neigh_node struct")
Reported-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 72125152cc46e55793329984428032769648904e Author: Simon Wunderlich simon@open-mesh.com Date: Wed Mar 26 15:46:23 2014 +0100
batman-adv: always run purge_orig_neighbors
The current code will not execute batadv_purge_orig_neighbors() when an orig_ifinfo has already been purged. However we need to run it in any case. Fix that.
This is a regression introduced by de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b ("batman-adv: split out router from orig_node")
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit cdd09f69871ce8c98b8ae9fa0583f73938768943 Author: Simon Wunderlich simon@open-mesh.com Date: Wed Mar 26 15:46:22 2014 +0100
batman-adv: fix neigh reference imbalance
When an interface is removed from batman-adv, the orig_ifinfo of a orig_node may be removed without releasing the router first. This will prevent the reference for the neighbor pointed at by the orig_ifinfo->router to be released, and this leak may result in reference leaks for the interface used by this neighbor. Fix that.
This is a regression introduced by de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b ("batman-adv: split out router from orig_node").
Reported-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a424cd5a2c956ef1f0353d7e5f2b7fbc4af7d2d8 Author: Simon Wunderlich simon@open-mesh.com Date: Wed Mar 26 15:46:21 2014 +0100
batman-adv: fix neigh_ifinfo imbalance
The neigh_ifinfo object must be freed if it has been used in batadv_iv_ogm_process_per_outif().
This is a regression introduced by 9bb33b8d88e318c4879d37d06ad28e3e018b9036 ("batman-adv: split tq information in neigh_node struct")
Reported-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e01abefce143a2d3f99695e5e66d6155d9799ed3 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Mar 22 09:17:22 2014 +0100
batman-adv: fix MCAST Kconfig option
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
commit e2ce130c5402f64c5be5962d74c04f6313dc17b7 Merge: 5409baf b08dc3d Author: Antonio Quartulli antonio@meshcoding.com Date: Fri Mar 21 23:39:44 2014 +0100
Merge commit 'b08dc3d9452d28944e7db09c2005c633b63f55e9' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
Conflicts: net/batman-adv/compat.h
commit b08dc3d9452d28944e7db09c2005c633b63f55e9 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Mar 19 18:57:35 2014 +0100
batman-adv: fix more code style
- use common iteration style pattern when looking up an object
Introduced by f2ed1502191a37abb39e3e2c80cca07f0f3bb411 ("batman-adv: Send multicast packets to nodes with a WANT_ALL flag")
Cc: Linux Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 45dab5f5509023946793fc9d1d0566c12ca8bb52 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Mar 19 18:57:34 2014 +0100
batman-adv: fix more code style
- keep variable declarations in descending line length order - use common iteration style pattern when looking up an object
Introduced by 86cb16e5ec1e2d75821006e8f4abbec66fb741ac ("batman-adv: Add IPv4 link-local/IPv6-ll-all-nodes multicast support")
Cc: Linux Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit bc45afd7e885c362703573808dc73c72e67df395 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Mar 19 18:57:33 2014 +0100
batman-adv: fix code style
- don't split lines if shorter than 80 chars - don't use goto if there is no cleanup to perform
Introduced by 90ad6a40c80323805be1e86504385de2bd861f0a ("batman-adv: Modified forwarding behaviour for multicast packets")
Cc: Linux Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 04ff3a04f6fb58671e9ed180609019f5b4273526 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Mar 19 18:57:32 2014 +0100
batman-adv: adjust copyright disclaimer in multicast files
The URL to the FSF address has to be always reported in the copyright disclaimer. This is the accepted style in the networking branch.
Introduced by e368857f66620b8483166e8e6556d9c87f9b3e71 ("batman-adv: Multicast Listener Announcements via Translation Table")
Cc: Linus Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5690930ceb5997c8e5cf93ec5da39e4d9fa065aa Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Mar 19 18:57:31 2014 +0100
batman-adv: fix multicast kerneldoc
The kerneldoc should always use the third person singular in the long function description. Moreover it should always try use up to 80 chars per line.
Introduced by f2ed1502191a37abb39e3e2c80cca07f0f3bb411 ("batman-adv: Send multicast packets to nodes with a WANT_ALL flag")
Cc: Linus Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 076d6a6d79b68df9fc4fce6cebb1c3c982fe5a76 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Mar 19 18:57:30 2014 +0100
batman-adv: fix multicast kerneldoc
The kerneldoc should always use the third person singular in the long function description. Moreover it should always try use up to 80 chars per line.
Introduced by 90ad6a40c80323805be1e86504385de2bd861f0a ("batman-adv: Modified forwarding behaviour for multicast packets")
Cc: Linus Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 3b44ced3a3902cb2450280b9bc3b1c5f52893abc Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Mar 19 18:57:29 2014 +0100
batman-adv: fix multicast kerneldoc
The kerneldoc should always use the third person singular in the long function description. Moreover it should always try use up to 80 chars per line.
Introduced by f70c60d236cddb28d9e576de774ad97f9b0fd1b7 ("batman-adv: Announce new capability via multicast TVLV")
Cc: Linus Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit da22087f5c8980eb7d2e370942bc60c872dfa1e0 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Mar 19 18:55:40 2014 +0100
batman-adv: fix multicast kerneldoc
The kerneldoc should always use the third person singular in the long function description. Moreover it should always try use up to 80 chars per line.
Introduced by commit 01d665e054254618353ec8d9ea43d1a138de6e6d ("batman-adv: Multicast Listener Announcements via Translation Table")
Cc: Linus Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a36b345efb2a2e552ceae97381e752aae16a48ef Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Mar 19 18:55:39 2014 +0100
batman-adv: fix multicast kerneldoc
The kerneldoc should always use the third person singular in the long function description. Moreover it should always try use up to 80 chars per line.
Introduced by 86cb16e5ec1e2d75821006e8f4abbec66fb741ac ("batman-adv: Add IPv4 link-local/IPv6-ll-all-nodes multicast support")
Cc: Linus Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 9ef7aad65a1df8ca5dd646e991205c402a58cd93 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Mar 19 18:55:38 2014 +0100
batman-adv: don't mess up with the netdev refcounting if not needed
Looking for an interface and increasing its refcounter only to check if it really exists is not really useful and makes the code look more complex without a real gain.
Change batadv_mcast_has_bridge() accordingly and avoid to use the pointer to the interface outside of the rcu_read_lock/unlock context.
Introduced by e368857f66620b8483166e8e6556d9c87f9b3e71 ("batman-adv: Multicast Listener Announcements via Translation Table")
Cc: Linus Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6f5426809da8af06d20927bd280084cc47fa68b0 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Mar 19 18:55:37 2014 +0100
batman-adv: remove useless goto
There is no need to use a label and a goto for code that is used once only. Moreover having a goto for a single return statement should always be avoided.
Introduced by e368857f66620b8483166e8e6556d9c87f9b3e71 ("batman-adv: Multicast Listener Announcements via Translation Table")
Cc: Linus Lüssing linus.luessing@web.de Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5409baf56e1c58c331ade23ab79f94cc66eaea6c Merge: 9c11ed6 c7cc2d4 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Mar 15 16:19:24 2014 +0100
Merge commit 'c7cc2d49351da21f041578ae33a59cd938b18c8c' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
Conflicts: net/batman-adv/CHANGELOG net/batman-adv/README.external
commit c7cc2d49351da21f041578ae33a59cd938b18c8c Merge: 62ea441 ae9f569 Author: Simon Wunderlich sw@simonwunderlich.de Date: Thu Mar 13 12:18:29 2014 +0100
Merge remote-tracking branch 'origin/next'
commit ae9f569821fb1196f38f7945d8bb110e001fadd2 Author: Simon Wunderlich sw@simonwunderlich.de Date: Thu Mar 13 12:16:01 2014 +0100
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit a28cfb453612d553ab989b263532420357384842 Author: Simon Wunderlich sw@simonwunderlich.de Date: Thu Mar 13 12:02:14 2014 +0100
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit f64ce99f367c8536b1a9181a2121d46b9e1b42ff Author: Simon Wunderlich sw@simonwunderlich.de Date: Sun Mar 2 19:02:42 2014 +0100
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 62ea441ee6ecdaa6187fab1458cbcc7e32429d2c Author: Antonio Quartulli antonio@open-mesh.com Date: Sat Feb 22 17:02:38 2014 +0100
batman-adv: improve DAT documentation
Add missing documentation for BATADV_DAT_ADDR_MAX and convert an existing documentation to kerneldoc
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6b65d962d6ad84d2d70e96ea98c4fd6518aec24f Author: Antonio Quartulli antonio@open-mesh.com Date: Sat Feb 22 16:48:14 2014 +0100
batman-adv: improve the TT flags documentation
Convert the current documentation for the TT flags in proper kerneldoc and improve it by adding an explanation for each of the flags.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c77850c50336970faff45cf30907d1cd6ee72ed6 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Feb 22 16:20:06 2014 +0100
batman-adv: properly align constant assignments
All the assignments in packet.h are properly aligned. Also the multicast constants have to have a similar shape.
Introduced by 1c090349e2f65d19a7f356cc0b61f13644c53bb6 ("batman-adv: Add IPv4 link-local/IPv6-ll-all-nodes multicast support")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f5129b218e55fa9afe43499a5aee7fdb0f99fd71 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Feb 26 14:13:32 2014 +0100
batman-adv: use the name of the array as pointer
Introduced by fb4756fe5f6e58ca2ab208ca634ae4c8dd6e9499 ("batman-adv: use ether_addr_copy instead of memcpy in multicast code")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 3b8bd3d7a9363dd14e79cb2937338627edd900f1 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Feb 26 14:10:42 2014 +0100
batman-adv: use the proper location in ether_addr_copy()
Introduced by: 513b2d107a4d88f62b9394926e377d2c6250775f ("batman-adv: prefer ether_addr_copy to memcpy")
Reported-by: kbuild test robot fengguang.wu@intel.com Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 9c11ed662985e4a48940edc697044d5072fe77a5 Merge: 14d695a fb4756f Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Feb 23 17:29:38 2014 +0100
Merge commit 'fb4756fe5f6e58ca2ab208ca634ae4c8dd6e9499' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
Conflicts: net/batman-adv/Makefile net/batman-adv/Makefile.kbuild net/batman-adv/compat.h net/batman-adv/gen-compat-autoconf.sh net/batman-adv/sysfs-class-net-mesh
commit 14d695a7bfadf092dea49a286618303b34417ae6 Merge: a97ec89 38dbfb5 Author: Antonio Quartulli antonio@meshcoding.com Date: Fri Feb 21 23:10:51 2014 +0100
Merge tag 'v3.14-rc1' into merge/master
Linus 3.14-rc1
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
Conflicts: net/batman-adv/bat_iv_ogm.c net/batman-adv/originator.c
commit fb4756fe5f6e58ca2ab208ca634ae4c8dd6e9499 Author: Linus Lüssing linus.luessing@web.de Date: Tue Feb 18 09:14:05 2014 +0100
batman-adv: use ether_addr_copy instead of memcpy in multicast code
ether_addr_copy is supposed to be slightly more efficient for copying mac addresses, so let's use it. This makes recent versions of checkpatch happy, too.
Introduced by e368857f66620b8483166e8e6556d9c87f9b3e71 ("batman-adv: Multicast Listener Announcements via Translation Table")
Reported-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 3a3f7b9d9627a9dc7fcf10221d617ccb32c72125 Merge: 534aa4a 73ae494 Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Feb 20 18:55:44 2014 +0800
Merge branch 'next'
commit 73ae49487a464fd75fdfd09483259b29cfe7255e Merge: 28d69c6 15fb0fa Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Feb 20 18:54:49 2014 +0800
Merge branch 'maint' into next
commit 15fb0fab51a3695738f65dfaab045e979fc89dce Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Feb 17 09:29:32 2014 +0100
batman-adv add compat code for consume_skb
consume_skb() has been implemented in 2.6.30, therefore some some compat code is needed for 2.6.29. This patch adds it.
Introduced by 9289542085d7e298b90c7b6fb6efb509dab69d8b ("batman-adv: free skb on TVLV parsing success")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 534aa4a53c8c63e008b4a2470113f0f50c9f0d16 Author: Martin Hundebøll martin@hundeboll.net Date: Tue Feb 18 12:03:55 2014 +0100
batman-adv: make the use of braces in if-else consistent
To avoid confusion, the linux kernel coding style discourage the use of one if-else branch with braces and another without braces.
Introduced-by: 65d8217193427026169c48112c561c5ca4d1bd18 ("batman-adv: compat: fix null pointer exception for kernels < 3.9")
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 65d8217193427026169c48112c561c5ca4d1bd18 Author: Linus Lüssing linus.luessing@web.de Date: Sun Feb 16 13:01:02 2014 +0100
batman-adv: compat: fix null pointer exception for kernels < 3.9
The compat code of the new multicast patchset leads to null pointer derefernces for kernels 3.9 in netdev_master_upper_dev_get_rcu(). This is because the initially NULL is assigned to upper, which is equal to dev. dev is dereferenced one line later, though, leading to a crash.
Fixing this by assigning NULL only when we are sure that the according pointer is not going to be dereferenced anymore.
Introduced by: 532cadf26cfbb1099ef31fae9ccafcbbfc37b9b5 ("batman-adv: Multicast Listener Announcements via Translation Table")
Reported-by: Marek Lindner mareklindner@neomailbox.ch Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 93079ca41d3519f552f3ed0935baec66053850e5 Merge: 0dd5d2c 28d69c6 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Feb 16 17:41:46 2014 +0800
Merge branch 'next'
commit 28d69c6ddab1d73052aaeffda879ce3bc146c0d1 Author: Stephen Hemminger stephen@networkplumber.org Date: Sat Feb 15 00:20:28 2014 +0100
batman-adv: remove unnecessary return's
One of my pet coding style peeves is the practice of adding extra return; at the end of function. Kill several instances of this in network code.
I suppose some coccinelle wizardy could do this automatically.
Signed-off-by: Stephen Hemminger stephen@networkplumber.org Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 0dd5d2ce46c18b12d7d5d92efe51c18aea91650d Author: Linus Lüssing linus.luessing@web.de Date: Sun Feb 16 10:27:58 2014 +0100
batman-adv: return NULL instead of 0 in batadv_mcast_forw_ip_node_get()
batadv_mcast_forw_ip_node_get() returns a pointer, so returning NULL in error cases is always more appropriate than 0.
Introduced by: c8fedbea81eac41a4971bb43353fd52a903d7c4c ("batman-adv: Send multicast packets to nodes with a WANT_ALL flag")
Reported-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 02705e425ce1c2cc36ff2f9e9f72c4a15fad952d Author: Linus Lüssing linus.luessing@web.de Date: Sat Feb 15 17:47:54 2014 +0100
batman-adv: Send multicast packets to nodes with a WANT_ALL flag
With this patch a node sends IPv4 multicast packets to nodes which have a BATADV_MCAST_WANT_ALL_IPV4 flag set and IPv6 multicast packets to nodes which have a BATADV_MCAST_WANT_ALL_IPV6 flag set, too.
Why is this needed? There are scenarios involving bridges where multicast report snooping and multicast TT announcements are not sufficient, which would lead to packet loss for some nodes otherwise:
MLDv1 and IGMPv1/IGMPv2 have a suppression mechanism for multicast listener reports. When we have an MLDv1/IGMPv1/IGMPv2 querier behind a bridge then our snooping bridge is potentially not going to see any reports even though listeners exist because according to RFC4541 such reports are only forwarded to multicast routers:
----------------------------------------------------------- --------------- {Querier}---|Snoop. Switch|----{Listener} --------------- \ ^ ------- | br0 | < ??? ------- \ _-~---~_ _-~/ ~-_ ~ batman-adv -----{Sender} ~_ cloud ~/ -~~__-__-~_/
I) MLDv1 Query: {Querier} -> flooded II) MLDv1 Report: {Listener} -> {Querier}
-> br0 cannot detect the {Listener} => Packets from {Sender} need to be forwarded to all detected listeners and MLDv1/IGMPv1/IGMPv2 queriers.
-----------------------------------------------------------
Note that we do not need to explicitly forward to MLDv2/IGMPv3 queriers, because these protocols have no report suppression: A bridge has no trouble detecting MLDv2/IGMPv3 listeners.
Even though we do not support bridges yet we need to provide the according infrastructure already to not break compatibility later.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 1c090349e2f65d19a7f356cc0b61f13644c53bb6 Author: Linus Lüssing linus.luessing@web.de Date: Sat Feb 15 17:47:53 2014 +0100
batman-adv: Add IPv4 link-local/IPv6-ll-all-nodes multicast support
With this patch a node may additionally perform the dropping or unicasting behaviour for a link-local IPv4 and link-local-all-nodes IPv6 multicast packet, too.
The extra counter and BATADV_MCAST_WANT_ALL_UNSNOOPABLES flag is needed because with a future bridge snooping support integration a node with a bridge on top of its soft interface is not able to reliably detect its multicast listeners for IPv4 link-local and the IPv6 link-local-all-nodes addresses anymore (see RFC4541, section 2.1.2.2 and section 3).
Even though this new flag does make "no difference" now, it'll ensure a seamless integration of multicast bridge support without needing to break compatibility later.
Also note, that even with multicast bridge support it won't be possible to optimize 224.0.0.x and ff02::1 towards nodes with bridges, they will always receive these ranges.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 405cc1e5a81e8160eeb903e496e6d110a354b1fd Author: Linus Lüssing linus.luessing@web.de Date: Sat Feb 15 17:47:52 2014 +0100
batman-adv: Modified forwarding behaviour for multicast packets
With this patch a multicast packet is not always simply flooded anymore, the behaviour for the following cases is changed to reduce unnecessary overhead:
If all nodes within the horizon of a certain node have signalized multicast listener announcement capability then an IPv6 multicast packet with a destination of IPv6 link-local scope (excluding ff02::1) coming from the upstream of this node...
* ...is dropped if there is no according multicast listener in the translation table, * ...is forwarded via unicast if there is a single node with interested multicast listeners * ...and otherwise still gets flooded.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 77ec494490d60d89b42cd01d5dbf8dee04503623 Author: Linus Lüssing linus.luessing@web.de Date: Sat Feb 15 17:47:51 2014 +0100
batman-adv: Announce new capability via multicast TVLV
If the soft interface of a node is not part of a bridge then a node announces a new multicast TVLV: The existence of this TVLV signalizes that this node is announcing all of its multicast listeners via the translation table infrastructure.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5d2121af6d31fb3a1fef1a19405602e95f2dddec Author: Linus Lüssing linus.luessing@web.de Date: Sat Feb 15 17:47:50 2014 +0100
batman-adv: introduce capability initialization bitfield
The new bitfield allows us to keep track whether capability subsets of an originator have gone through their initialization phase yet.
The translation table is the only user right now, but a new one will be added soon.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e368857f66620b8483166e8e6556d9c87f9b3e71 Author: Linus Lüssing linus.luessing@web.de Date: Sat Feb 15 17:47:49 2014 +0100
batman-adv: Multicast Listener Announcements via Translation Table
With this patch a node which has no bridge interface on top of its soft interface announces its local multicast listeners via the translation table.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4d421fb07bad6e7f3aaceffa5b2d5a9918e0d746 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Feb 15 11:58:01 2014 +0100
batman-adv: add kerneldoc for dst_hint argument
Some helper functions used along the TX path have now a new "dst_hint" argument but the kerneldoc was missing.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a97ec892afc89d1b81cd8934697f47b3ee4efd10 Merge: 669cbd5 d805612 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Feb 15 21:04:59 2014 +0100
Merge commit 'd80561222893dfca2bbf32dc75a697fd24bbf14e' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
Conflicts: net/batman-adv/compat.h
commit 77cece93db879af1060e52580089be60557d7a21 Merge: da134af d805612 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Feb 15 09:43:14 2014 +0800
Merge branch 'next'
commit d80561222893dfca2bbf32dc75a697fd24bbf14e Merge: 637eb9c d4acda1 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Feb 15 09:42:19 2014 +0800
Merge branch 'maint' into next
commit d4acda1cb9cca135e7b91777bb2680518b3cffa0 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Feb 15 02:17:20 2014 +0100
batman-adv: avoid double free when orig_node initialization fails
In the failure path of the orig_node initialization routine the orig_node->bat_iv.bcast_own field is free'd twice: first in batadv_iv_ogm_orig_get() and then later in batadv_orig_node_free_rcu().
Fix it by removing the kfree in batadv_iv_ogm_orig_get().
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 9289542085d7e298b90c7b6fb6efb509dab69d8b Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Feb 11 17:05:07 2014 +0100
batman-adv: free skb on TVLV parsing success
When the TVLV parsing routine succeed the skb is left untouched thus leading to a memory leak.
Fix this by consuming the skb in case of success.
Introduced by 0b6aa0d43767889eeda43a132cf5e73df4e63bf2 ("batman-adv: tvlv - basic infrastructure")
Reported-by: Russel Senior russell@personaltelco.net Signed-off-by: Antonio Quartulli antonio@open-mesh.com Tested-by: Russell Senior russell@personaltelco.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit be4385eacf30ad55a5cf4574768624ce8141a0c7 Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Feb 11 17:05:06 2014 +0100
batman-adv: fix TT CRC computation by ensuring byte order
When computing the CRC on a 2byte variable the order of the bytes obviously alters the final result. This means that computing the CRC over the same value on two archs having different endianess leads to different numbers.
The global and local translation table CRC computation routine makes this mistake while processing the clients VIDs. The result is a continuous CRC mismatching between nodes having different endianess.
Fix this by converting the VID to Network Order before processing it. This guarantees that every node uses the same byte order.
Introduced by 21a57f6e7a3b4455dfe68ee07a7b901d9e7f200b ("batman-adv: make the TT CRC logic VLAN specific")
Reported-by: Russel Senior russell@personaltelco.net Signed-off-by: Antonio Quartulli antonio@open-mesh.com Tested-by: Russell Senior russell@personaltelco.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit da134af671c9d51a3d248a78a8ecec5f237dc25f Merge: 548c938 637eb9c Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Feb 11 20:09:19 2014 +0800
Merge branch 'next'
commit 637eb9c1b9da79b038061bad2ac9724183f3930e Merge: e08e28f df99b07 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Feb 11 20:08:40 2014 +0800
Merge branch 'maint' into next
commit df99b07081eeda5cca292afe2dcc5cb3bf5be154 Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Feb 11 11:26:43 2014 +0100
batman-adv: fix memory access by setting mac_header in DAT
In the TX path we now have functions that rely on the skb->mac_header field. DAT does not set such field when creating its own ARP packets thus leading to wrong memory access.
Fix it by always setting the mac_header after having forged the ARP packet.
Introduced by 41b38727749a94c1a65cf0f4be9bfe1cbaf0adeb ("batman-adv: fix potential kernel paging error for unicast transmissions")
Reported-by: Russel Senior russell@personaltelco.net Signed-off-by: Antonio Quartulli antonio@meshcoding.com Tested-by: Russel Senior russell@personaltelco.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit cb4d66e6803b854663ee758e3eecbda183b0b007 Author: Simon Wunderlich sw@simonwunderlich.de Date: Sat Feb 8 16:45:06 2014 +0100
batman-adv: fix potential orig_node reference leak
Since batadv_orig_node_new() sets the refcount to two, assuming that the calling function will use a reference for putting the orig_node into a hash or similar, both references must be freed if initialization of the orig_node fails. Otherwise that object may be leaked in that error case.
Reported-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 548c938bfef2dfad63d999fc9005f1d387e3d15a Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Feb 8 23:28:18 2014 +0800
batman-adv: call unregister_netdev() to have it handle the locking for us
Reported-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 11beafc4cbb0a28d06944503578d9c3d98073dcd Merge: b8ffcbc e08e28f Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Feb 8 21:23:25 2014 +0800
Merge branch 'next'
commit e08e28fab0d46b0a722a70bbc59cf7f76a98aba8 Author: Antonio Quartulli antonio@open-mesh.com Date: Wed Jan 29 11:25:12 2014 +0100
batman-adv: avoid potential race condition when adding a new neighbour
When adding a new neighbour it is important to atomically perform the following: - check if the neighbour already exists - append the neighbour to the proper list
If the two operations are not performed in an atomic context it is possible that two concurrent insertions add the same neighbour twice.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit b8ffcbc4a061aada81d5e1756f17f4021b6427c5 Merge: fbe649d b04eca1 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Feb 8 21:16:34 2014 +0800
Merge branch 'next'
commit b04eca1dfa2e2cca2a28821bce137fadd4d8548f Merge: e175a9f b921e8f Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Feb 8 21:15:01 2014 +0800
Merge branch 'maint' into next
commit b921e8f70aa929766856decfe79ee8e78ba21e23 Author: Linus Lüssing linus.luessing@web.de Date: Sun Feb 2 22:53:11 2014 +0800
batman-adv: backport eth_hdr() compat fix to avoid kernel oops
Introduced by 41b38727749a94c1a65cf0f4be9bfe1cbaf0adeb ("batman-adv: fix potential kernel paging error for unicast transmissions")
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch CC: Linus Lüssing linus.luessing@web.de
commit fbe649dfdd07d871f5b47b5e8ea1b03d104feb9d Merge: f6a1006 e175a9f Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Feb 2 22:57:58 2014 +0800
Merge branch 'next'
Conflicts: send.c
commit e175a9fd8ec8e02cbabe814c6146c9944ecc44ae Merge: fedc76c 9a91d33 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Feb 2 22:55:17 2014 +0800
Merge branch 'maint' into next
commit 9a91d33c0ea234faf59ee7543d5253e6809a6b6f Author: Antonio Quartulli antonio@meshcoding.com Date: Thu Jan 30 13:57:27 2014 +0100
batman-adv: remove useless assignment
Introduced by 41b38727749a94c1a65cf0f4be9bfe1cbaf0adeb ("batman-adv: fix potential kernel paging error for unicast transmissions")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit eabdc3175b1d119cd673f36d06264cddb4803ace Author: Antonio Quartulli antonio@meshcoding.com Date: Thu Jan 30 00:12:24 2014 +0100
batman-adv: properly check pskb_may_pull return value
pskb_may_pull() returns 1 on success and 0 in case of failure, therefore checking for the return value being negative does not make sense at all.
This way if the function fails we will probably read beyond the current skb data buffer. Fix this by doing the proper check.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f6a10065d42545528d16c6e55d05dbde9543857a Merge: 3ce6275 fedc76c Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Jan 29 12:46:41 2014 +0800
Merge branch 'next'
commit fedc76c01227c9c3d15374851ff11e2701d7fd08 Merge: 0f8a4e6 dc08c04 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Jan 29 12:46:08 2014 +0800
Merge branch 'maint' into next
commit dc08c045b46bdd9a5c81068a89f9f2a78d3d4bbd Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Jan 28 02:06:47 2014 +0100
batman-adv: release vlan object after checking the CRC
There is a refcounter unbalance in the CRC checking routine invoked on OGM reception. A vlan object is retrieved (thus its refcounter is increased by one) but it is never properly released. This leads to a memleak because the vlan object will never be free'd.
Fix this by releasing the vlan object after having read the CRC.
Reported-by: Russell Senior russell@personaltelco.net Reported-by: Daniel daniel@makrotopia.org Reported-by: cmsv cmsv@wirelesspt.net Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit db13d361ff6abf57090acfdeb0f5cedd8dd7f02e Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Jan 27 12:23:28 2014 +0100
batman-adv: fix TT-TVLV parsing on OGM reception
When accessing a TT-TVLV container in the OGM RX path the variable pointing to the list of changes to apply is altered by mistake.
This makes the TT component read data at the wrong position in the OGM packet buffer.
Fix it by removing the bogus pointer alteration.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 3ce62758042225ca18bf94d64757f6e336de26b6 Merge: 5b70699 0f8a4e6 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jan 27 15:58:43 2014 +0800
Merge branch 'next'
commit 0f8a4e6c6034dfd8a7924f1dd956354d740537b7 Merge: 6e48fd6 2b108cc Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jan 27 15:58:06 2014 +0800
Merge branch 'maint' into next
commit 2b108ccd0533e1375e44c73ec58c69dde9a71687 Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Jan 21 11:22:05 2014 +0100
batman-adv: fix soft-interface MTU computation
The current MTU computation always returns a value smaller than 1500bytes even if the real interfaces have an MTU large enough to compensate the batman-adv overhead.
Fix the computation by properly returning the highest admitted value.
Introduced by f7f2fe494388fca828094a4ebdab918a7b2d64f8 ("batman-adv: limit local translation table max size")
Reported-by: Russell Senior russell@personaltelco.net Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5b7069947a44978d22f168746c87b3271c5f209e Author: Simon Wunderlich sw@simonwunderlich.de Date: Fri Jan 24 22:16:25 2014 +0100
batman-adv: fix a few kerneldoc inconsistencies
Reported-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 513b2d107a4d88f62b9394926e377d2c6250775f Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Jan 22 00:42:11 2014 +0100
batman-adv: prefer ether_addr_copy to memcpy
On some architectures ether_addr_copy() is slightly faster than memcpy() therefore use the former when possible.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 68b0173ac9545c6953e6de7450b05aec13bb7eee Merge: a093442 6e48fd6 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jan 27 15:46:43 2014 +0800
Merge branch 'next'
commit 6e48fd675e9d6875b92966a460cc5ef3aaf283e5 Merge: 284946d 41b3872 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Jan 27 15:46:14 2014 +0800
Merge branch 'maint' into next
commit 41b38727749a94c1a65cf0f4be9bfe1cbaf0adeb Author: Linus Lüssing linus.luessing@web.de Date: Mon Jan 20 11:06:44 2014 +0100
batman-adv: fix potential kernel paging error for unicast transmissions
batadv_send_skb_prepare_unicast(_4addr) might reallocate the skb's data. If it does then our ethhdr pointer is not valid anymore in batadv_send_skb_unicast(), resulting in a kernel paging error.
Fixing this by refetching the ethhdr pointer after the potential reallocation.
Introduced by b46c60b9e1ee7a1909c542413a85875a750955d6 ("batman-adv: improve unicast packet (re)routing")
Signed-off-by: Linus Lüssing linus.luessing@web.de Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a093442f5aefcab37246114a2fd73f37478d6b18 Author: Linus Lüssing linus.luessing@web.de Date: Sun Jan 19 22:22:46 2014 +0100
batman-adv: remove obsolete skb_reset_mac_header() in batadv_bla_tx()
Our .ndo_start_xmit handler (batadv_interface_tx()) can rely on having the skb mac header pointer set correctly since the following commit present in kernels >= 3.9:
"net: reset mac header in dev_start_xmit()" (6d1ccff627)
Therefore this commit removes the according, now redundant, skb_reset_mac_header() call in batadv_bla_tx().
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f9170f22998a276e04b4c7d91da4c373609d28b3 Author: Linus Lüssing linus.luessing@web.de Date: Sun Jan 19 22:22:45 2014 +0100
batman-adv: use vlan_/eth_hdr() instead of skb->data in interface_tx path
Our .ndo_start_xmit handler (batadv_interface_tx()) can rely on having the skb mac header pointer set correctly since the following commit present in kernels >= 3.9:
"net: reset mac header in dev_start_xmit()" (6d1ccff627)
Therefore we can safely use eth_hdr() and vlan_eth_hdr() instead of skb->data now, which spares us some ugly type casts.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 86c638b1b4996139004da9c06a94948613d4cee5 Merge: c99b36a 284946d Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Jan 16 18:58:28 2014 +0800
Merge branch 'next'
commit 284946d579a7c79c12aacb6d8e2734c50567f458 Author: Ying Xue ying.xue@windriver.com Date: Wed Jan 15 10:23:42 2014 +0800
batman-adv: use __dev_get_by_index instead of dev_get_by_index to find interface
The following call chains indicate that batadv_is_on_batman_iface() is always under rtnl_lock protection as call_netdevice_notifier() is protected by rtnl_lock. So if __dev_get_by_index() rather than dev_get_by_index() is used to find interface handler in it, this would help us avoid to change interface reference counter.
call_netdevice_notifier() batadv_hard_if_event() batadv_hardif_add_interface() batadv_is_valid_iface() batadv_is_on_batman_iface()
Cc: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Ying Xue ying.xue@windriver.com Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c99b36aeb356bc7a386eb85de9255b4b35d3132e Author: Fengguang Wu fengguang.wu@intel.com Date: Mon Jan 6 17:09:46 2014 +0100
batman-adv: fix coccinelle warnings
net/batman-adv/network-coding.c:1535:1-7: Replace memcpy with struct assignment
Generated by: coccinelle/misc/memcpy-assign.cocci Signed-off-by: Fengguang Wu fengguang.wu@intel.com Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 669cbd55edae689ce151bc17860f9cd236b72c5e Merge: 5dbc980 4b78c87 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Jan 15 23:52:07 2014 +0100
Merge commit '4b78c87e26da64e8c1f586391917b50e243fac9b' into merge/master
commit 4b78c87e26da64e8c1f586391917b50e243fac9b Author: Simon Wunderlich sw@simonwunderlich.de Date: Wed Jan 15 21:17:54 2014 +0100
batman-adv: use consistent kerneldoc style
Reported-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 0231675a09215759f10095594af459218530f4f3 Merge: cb60702 746d643 Author: Marek Lindner mareklindner@neomailbox.ch Date: Thu Jan 16 06:40:07 2014 +0800
Merge branch 'maint' into next
commit 746d6436f88899a79c1cb3b27af0614510368bb7 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Jan 15 20:31:18 2014 +0800
batman-adv: fix batman-adv header overhead calculation
Batman-adv prepends a full ethernet header in addition to its own header. This has to be reflected in the MTU calculation, especially since the value is used to set dev->hard_header_len.
Introduced by f1f310d5c261f0214f85afea95d5cd11d49d64c6 ("batman-adv: consider network coding overhead when calculating required mtu")
Reported-by: cmsv cmsv@wirelesspt.net Reported-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 5dbc980182623f66508ad59d66f1c911f83e4496 Merge: ff65116 cb60702 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Jan 8 17:30:51 2014 +0100
Merge commit 'cb6070296aed529514f26fec675024390bdca230' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
Conflicts: net/batman-adv/CHANGELOG net/batman-adv/Makefile.kbuild net/batman-adv/README.external net/batman-adv/compat.c net/batman-adv/compat.h
commit cb6070296aed529514f26fec675024390bdca230 Merge: 8eb830f bc9be93 Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Jan 6 10:30:36 2014 +0100
Merge remote-tracking branch 'origin/next'
commit bc9be93f8a6e7597198fcfd9393094f1463c3c65 Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Jan 6 10:24:16 2014 +0100
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 692bb9a7e4928932479e895735f90d7e4dfeaa47 Author: Simon Wunderlich sw@simonwunderlich.de Date: Sat Jan 4 20:43:27 2014 +0100
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit a68de2fc5cbf74b737e6a8d4bb0531eb0e552541 Author: Simon Wunderlich sw@simonwunderlich.de Date: Sat Jan 4 20:40:51 2014 +0100
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 8eb830fa19d3c61ec2d305c68b2724b865611167 Merge: 7540bb8 77c2a6c Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Jan 5 19:19:35 2014 +0800
Merge branch 'next'
Conflicts: originator.c translation-table.c
commit 77c2a6c858270cc3802595b45b14d76e92401568 Author: Ding Tianhong dingtianhong@huawei.com Date: Thu Dec 26 19:40:39 2013 +0800
batman-adv: use batadv_compare_eth for concise
It is better to use batadv_compate_eth instead of memcpy for concise style.
Cc: Marek Lindner mareklindner@neomailbox.ch Cc: Simon Wunderlich sw@simonwunderlich.de Cc: Antonio Quartulli antonio@meshcoding.com Cc: "David S. Miller" davem@davemloft.net Cc: b.a.t.m.a.n@lists.open-mesh.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Tan Xiaojun tanxiaojun@huawei.com Signed-off-by: Ding Tianhong dingtianhong@huawei.com Acked-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 7540bb8aa4056635f4d750018f551c7cf223a393 Merge: 01aac22 1ae5d31 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Jan 5 01:53:02 2014 +0800
Merge branch 'next'
commit 1ae5d31ef63667d7c2d4546eeec206e6753dd24a Author: Simon Wunderlich sw@simonwunderlich.de Date: Sat Jan 4 18:04:25 2014 +0100
batman-adv: update copyright years for 2014
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4ae5daa307bc79090deed1def16294d81cbcb02d Author: Simon Wunderlich sw@simonwunderlich.de Date: Sat Jan 4 18:04:24 2014 +0100
batman-adv: change version to 2014.0.0
Since we delayed the 2013.5.0 release to 2014, change the release name.
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 01aac2281268b8bd8d63fc2836d80fca35b627a4 Merge: 46b165b c03be25 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Jan 4 17:32:07 2014 +0800
Merge branch 'next'
commit ff6511646a6c127ed472de2f92cfeeeb4fa3d19c Merge: cba8a50 46b165b Author: Antonio Quartulli antonio@meshcoding.com Date: Thu Jan 2 21:57:55 2014 +0100
Merge commit '46b165b1793c47c1384fa2bac026ee50f5f54eb2' into merge/master
Conflicts: net/batman-adv/compat.h
commit 46b165b1793c47c1384fa2bac026ee50f5f54eb2 Author: Simon Wunderlich sw@simonwunderlich.de Date: Fri Dec 27 14:05:37 2013 +0100
batman-adv: fix compat sparse errors for BUILD_BUG_ON in <= 2.6.39
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 183150bf258f27683cad5c0e28c4aa638798023c Author: Simon Wunderlich sw@simonwunderlich.de Date: Thu Dec 26 18:57:01 2013 +0100
batman-adv: fix NULL pointer deref in batadv_find_best_neighbor
If there is no best neighbor, don't dereference the NULL pointer. Try to acquire the neighbor node right in the loop instead. There also was a logic bug, finding the worst instead of the best neighbor.
Introduced by 9bb33b8d88e318c4879d37d06ad28e3e018b9036 ("batman-adv: split tq information in neigh_node struct")
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c03be25aba23b39189f8e3858aed1dd03061a3ed Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Dec 23 21:43:39 2013 +0100
batman-adv: fix vlan header access
When batadv_get_vid() is invoked in interface_rx() the batman-adv header has already been removed, therefore the header_len argument has to be 0.
Introduced by 580d7919f19e4f73ccd79e82a532af2bdc638042 ("batman-adv: add the VLAN ID attribute to the TT entry")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 30e60452fcfdc5dbb2e46998b8d2476672ded929 Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Dec 17 19:12:12 2013 +0100
batman-adv: add build checks for packet sizes
With unrolling the batadv_header into the respective structures, the offsetof checks are now useless. Instead, add build checks for all packet types which go over the wire to avoid problems with wrong sizes or compatibility issues on some architectures which don't use every day.
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 7bfb1387d4a768195cc6eb2322782e7581b61813 Merge: 0fff84d 7678d5d Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Dec 25 22:12:18 2013 +0800
Merge branch 'next'
commit 7678d5d34e9c96b041c3509810cf03bc8740e526 Merge: 6639da5 1356028 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Dec 25 22:12:00 2013 +0800
Merge branch 'maint' into next
Conflicts: soft-interface.c
commit 135602880b28bc7cf12c60fec550a6122851f2e9 Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Dec 23 01:28:05 2013 +0100
batman-adv: clean nf state when removing protocol header
If an interface enslaved into batman-adv is a bridge (or a virtual interface built on top of a bridge) the nf_bridge member of the skbs reaching the soft-interface is filled with the state about "netfilter bridge" operations.
Then, if one of such skbs is locally delivered, the nf_bridge member should be cleaned up to avoid that the old state could mess up with other "netfilter bridge" operations when entering a second bridge. This is needed because batman-adv is an encapsulation protocol.
However at the moment skb->nf_bridge is not released at all leading to bogus "netfilter bridge" behaviours.
Fix this by cleaning the netfilter state of the skb before it gets delivered to the upper layer in interface_rx().
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 96bd7236a4dac51fa03f49679b47708825c36674 Author: Antonio Quartulli antonio@meshcoding.com Date: Mon Dec 23 01:28:04 2013 +0100
Revert "batman-adv: free nf_bridge member on locally delivered skb"
This reverts commit 9048eb62124f47f66d12eb1d706ab5fb265553f7.
This fix can be implemented using the nf_Reset() helper instead of partly reimplementing it with a batman-adv private function.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit cba8a50e21d0676e73c7fc4bee3bd32d518c3cd7 Merge: 6cd3cc5 0fff84d Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Dec 18 23:39:36 2013 +0100
Merge commit '0fff84d6b5fcde060cf42e9260840c025ae20b07' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
Conflicts: net/batman-adv/Makefile.kbuild net/batman-adv/compat.c net/batman-adv/compat.h
commit 0fff84d6b5fcde060cf42e9260840c025ae20b07 Merge: 1587850 6639da5 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Dec 16 22:24:22 2013 +0800
Merge branch 'next'
commit 6639da59f7dd3c08c54b0ecab3a709b37d1d1e49 Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Dec 15 13:26:55 2013 +0100
batman-adv: fix alignment for batadv_tvlv_tt_change
Make struct batadv_tvlv_tt_change a multiple 4 bytes long to avoid padding on any architecture.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 15878506adb8237e0332b2ecfca363549347d952 Merge: 65f9fec 6b5c638 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Dec 16 22:16:15 2013 +0800
Merge branch 'next'
Conflicts: bat_iv_ogm.c network-coding.c
commit 6b5c638df116b0320579ddc5e3b9b7cc894411ee Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Dec 2 20:38:33 2013 +0100
batman-adv: fix size of batadv_bla_claim_dst
Since this is a mac address and always 48 bit, and we can assume that it is always aligned to 2-byte boundaries, add a pack(2) pragma.
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6d80786d56c560633fd283d3a9e7feb7a605da25 Author: Antonio Quartulli antonio@meshcoding.com Date: Thu Dec 5 15:33:00 2013 +0100
batman-adv: fix size of batadv_icmp_header
struct batadv_icmp_header currently has a size of 17, which will be padded to 20 on some architectures. Fix this by unrolling the header into the parent structures.
Moreover keep the ICMP parsing functions as generic as they are now by using a stub icmp_header struct during packet parsing.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 31f0d40bfbee764f203a5c2c19a0e7164642a976 Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Dec 2 20:38:31 2013 +0100
batman-adv: fix header alignment by unrolling batadv_header
The size of the batadv_header of 3 is problematic on some architectures which automatically pad all structures to a 32 bit boundary. To not lose performance by packing this struct, better embed it into the various host structures.
Reported-by: Russell King linux@arm.linux.org.uk Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 08a9dd9a5a9e5b8fb7e984a75096e3c5cd569238 Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Dec 2 20:38:30 2013 +0100
batman-adv: fix alignment for batadv_coded_packet
The compiler may decide to pad the structure, and then it does not have the expected size of 46 byte. Fix this by moving it in the pragma pack(2) part of the code.
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 65f9fec956881e13215e77b75388aa4aae549fba Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Dec 7 11:21:24 2013 +0100
batman-adv: fix typ0s in batadv_tt_global_is_isolated()
Introduced by 6fa38a2c72cc79dd961a6d9ed00d32e1c308b448 ("batman-adv: set the isolation mark in the skb if needed")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 21dfc1a12d33451089becb28a4d6ec252c32dc51 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Dec 7 11:21:23 2013 +0100
batman-adv: fix typ0s in batadv_store_isolation_mark()
Introduced by e29249b4483b91d7a590a16e9b5ffe9412ce7fde ("batman-adv: add isolation_mark sysfs attribute")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit ef4d227534cb6ad546574676be3f2bb7f13f84a3 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Dec 7 11:21:22 2013 +0100
batman-adv: fix typ0 in batadv_orig_hardif_seq_print_text()
Introduced by f13f960797fd1969b3c0470cc97435ddfb6aecb4 ("batman-adv: add debugfs support to view multiif tables")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2be81d78accf8fba70d5f4ad850732d97759ff6d Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Dec 7 11:21:21 2013 +0100
batman-adv: fix typ0 in sysfs.c
Fix a small typ0 in sysfs.c. Introduced by 99a6eb50ef5066e125cedb97bc0fcfcdff4f08cc ("batman-adv: deselect current GW on client mode switch off")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 63168f98c05fad59dd094451ec16463446a0f5b6 Author: Antonio Quartulli antonio@meshcoding.com Date: Fri Dec 6 18:56:52 2013 +0100
batman-adv fix FSF address
Jeff Kirsher is patching most of the networking modules to accommodate this new policy for what concern the FSF address in the GPL license. However he is using a slightly different version than what we did.
Since his changes have already been applied, fix our text to match what he proposed.
Introduced by c2a8e168c0ae7d23803ff6a09d25a28dfaa57d58 ("batman-adv: remove FSF address from GPL disclaimer")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit aeeb12c2cccfbb068624f11473d18c232284dadb Merge: f2a1300 91890af Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Dec 11 16:25:00 2013 +0800
Merge branch 'next'
Conflicts: main.h
commit 91890af1caaa170e09a5051c0c51db1ddb493f34 Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Dec 10 19:39:00 2013 +0100
batadv: Slight optimization of batadv_compare_eth
Use the newly added generic routine ether_addr_equal_unaligned to test if possibly unaligned to u16 Ethernet addresses are equal.
This slightly improves comparison time for systems with CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS.
Signed-off-by: Joe Perches joe@perches.com [antonio@meshcoding.com: added compat code for linux <3.14] Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 96e211f71233b9052707e12cbf40c4e49cce3822 Merge: 03b50b5 9048eb6 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Dec 11 02:24:16 2013 +0800
Merge branch 'maint' into next
commit 9048eb62124f47f66d12eb1d706ab5fb265553f7 Author: Antonio Quartulli antonio@meshcoding.com Date: Fri Dec 6 15:07:15 2013 +0100
batman-adv: free nf_bridge member on locally delivered skb
If an interface enslaved into batman-adv is a bridge (or a virtual interface built on top of a bridge) the nf_bridge member of the skbs reaching the soft-interface is filled with the state about "netfilter bridge" operations.
Then, if one of such skbs is locally delivered, the nf_bridge member should be cleaned up to avoid that the old state could mess up with other "netfilter bridge" operations when entering a second bridge. This is needed because batman-adv is an encapsulation protocol.
However at the moment skb->nf_bridge is not released at all leading to bogus "netfilter bridge" behaviours. Fix this by releasing skb->nf_bridge before an skb gets delivered to the upper layer in interface_rx().
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6cd3cc52fa892d358e39a4cbe12bb054aca9329d Merge: 804e2826 f2a1300 Author: Antonio Quartulli antonio@meshcoding.com Date: Fri Dec 6 17:56:29 2013 +0100
Merge commit 'f2a130060f657c07fe78d6fae8bb593670d9033f' into merge/master
Signed-off-by: Antonio Quartulli antonio@meshcoding.com
Conflicts: net/batman-adv/Makefile.kbuild net/batman-adv/README net/batman-adv/compat.c net/batman-adv/compat.h net/batman-adv/sysfs-class-net-mesh
commit 804e2826960995bd5d7cfe2fa09aad88480de18f Merge: 2138883 6ce4eac Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Dec 1 12:10:57 2013 +0100
Merge tag 'v3.13-rc1' into merge/master
Linux 3.13-rc1
commit f2a130060f657c07fe78d6fae8bb593670d9033f Author: Simon Wunderlich simon@open-mesh.com Date: Sun Nov 24 14:05:45 2013 +0100
batman-adv: fix rcu pointer comparison problem
sparse complained about:
routing.c:482:64: error: incompatible types in comparison expression (different address spaces)
This was due to comparing a __rcu pointer with a regular one. Fix that by adding the missing rcu_dereference call. A temporary variable is used to comply with the line length limit, use the opportunity to beautify a few other places.
This problem was introduced in commit 797edd9e87ac838711e03498a4ae795b600191af ("batman-adv: add bonding again")
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit dd510526e0c72640417fbcfbce56eeb49ccff89a Author: Simon Wunderlich simon@open-mesh.com Date: Sun Nov 24 14:05:44 2013 +0100
batman-adv: fix wrong alignment for batadv_originators_hardif_open
Introduced in my commit f13f960797fd1969b3c0470cc97435ddfb6aecb4 ("batman-adv: add debugfs support to view multiif tables")
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 20978cae66114f4dce6ba7f9f980eadfccff8570 Author: Simon Wunderlich simon@open-mesh.com Date: Sun Nov 24 14:05:43 2013 +0100
batman-adv: fix another sparse warning in batadv_iv_ogm_emit
Since the directlink variable was not needed anymore and was removed, more variables are now obsolete too, so remove them.
The directlink flag commit (which was obviously incomplete) was a0fc2f129f7193cbdd7e9c2e4da0d6e7ac15dd58 ("batman-adv: fix sparse warning in batadv_iv_ogm_emit"), which itself was a fix for 29b9256e6631876d4f1719f4d5e13d7ee140c61b ("batman-adv: consider outgoing interface in OGM sending").
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 28dab2693a0e52b15789bb67360aa27c3cf6df0f Author: Antonio Quartulli antonio@meshcoding.com Date: Fri Nov 22 18:38:30 2013 +0100
batman-adv: fix compat macro for kstrtou32
The macro previously introduced in the compat code to replace kstrtou32() may not work properly in case of a too large user input.
Fix it by using a temporary variable of the proper length and then cast the result.
Possibly return -ERANGE is the result is too big to fix a 32bit long variable.
Cc: Matthias Schiffer mschiffer@universe-factory.net Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit d078de322df4be35651333070f6eb6f377181416 Author: Simon Wunderlich simon@open-mesh.com Date: Fri Nov 22 13:02:07 2013 +0100
batman-adv: fix orig_node multiif regression in network coding
A previous commit for the multi interface optimization did not change the member access for orig_node to their respective new ifinfo structures for the network coding implementation.
This was introduced by change de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b ("batman-adv: split out router from orig_node")
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit cb7ec5ff60a05ebecd141e87b4d544b82738b46d Author: Simon Wunderlich simon@open-mesh.com Date: Fri Nov 22 13:02:06 2013 +0100
batman-adv: fix neigh_node multiif regression in network coding
A previous commit for the multi interface optimization did not change the member access for neigh_node to their respective new ifinfo structures for the network coding implementation.
This was introduced by change 9bb33b8d88e318c4879d37d06ad28e3e018b9036 ("batman-adv: split tq information in neigh_node struct")
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 930c3b9ab7da424943fde620bb808df39e57a7e2 Author: Simon Wunderlich simon@open-mesh.com Date: Fri Nov 22 13:30:27 2013 +0100
batman-adv: fix sparse warning in batadv_iv_ogm_process_per_outif
The orig_node_tmp variable is not needed anymore, and spare complains about that. Remove it.
This variable was used for line length reasons and usage was removed in de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b ("batman-adv: split out router from orig_node")
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a0fc2f129f7193cbdd7e9c2e4da0d6e7ac15dd58 Author: Simon Wunderlich simon@open-mesh.com Date: Fri Nov 22 13:30:26 2013 +0100
batman-adv: fix sparse warning in batadv_iv_ogm_emit
The directlink variable is not needed anymore, and sparse complains about that. Remove it.
Removal was introduced in 29b9256e6631876d4f1719f4d5e13d7ee140c61b ("batman-adv: consider outgoing interface in OGM sending")
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit aed390db25c837c3002925a468b4d32d9a2b3ecb Author: Simon Wunderlich simon@open-mesh.com Date: Fri Nov 22 13:30:25 2013 +0100
batman-adv: silence uninitialized variable warning
sparse (at least the version of the build checker) is complaining about:
routing.c: In function 'batadv_find_router': routing.c:431:28: warning: 'next_candidate_router' may be used uninitialized in this function [-Wmaybe-uninitialized]
Although this is bogus, silencing is not expensive and is done by this patch.
Introduced by 797edd9e87ac838711e03498a4ae795b600191af ("batman-adv: add bonding again")
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4812dfddc3d4a382f679f108e6f6fcb72547816e Author: Simon Wunderlich simon@open-mesh.com Date: Fri Nov 22 13:30:24 2013 +0100
batman-adv: fix multiline comment
This problem was introduced by commit 9bb33b8d88e318c4879d37d06ad28e3e018b9036 ("batman-adv: split tq information in neigh_node struct")
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f13f960797fd1969b3c0470cc97435ddfb6aecb4 Author: Simon Wunderlich simon@open-mesh.com Date: Thu Nov 21 11:52:16 2013 +0100
batman-adv: add debugfs support to view multiif tables
Show tables for the multi interface operation. Originator tables are added per hard interface.
This patch also changes the API by adding the interface to the bat_orig_print() parameters.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 3c926a01c8e8e2853cac47f26217f3594ae25eca Author: Simon Wunderlich simon@open-mesh.com Date: Thu Nov 21 14:16:12 2013 +0100
batman-adv: add debugfs structure for information per interface
To show information per interface, add a debugfs hardif structure similar to the system in sysfs. Hard interface folders will be created in "$debugfs/batman-adv/". Files are not yet added.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 797edd9e87ac838711e03498a4ae795b600191af Author: Simon Wunderlich simon@open-mesh.com Date: Wed Nov 13 19:14:50 2013 +0100
batman-adv: add bonding again
With the new interface alternating, the first hop may send packets in a round robin fashion to it's neighbors because it has multiple valid routes built by the multi interface optimization. This patch enables the feature if bonding is selected. Note that unlike the bonding implemented before, this version is much simpler and may even enable multi path routing to a certain degree.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 29b9256e6631876d4f1719f4d5e13d7ee140c61b Author: Simon Wunderlich simon@open-mesh.com Date: Wed Nov 13 19:14:49 2013 +0100
batman-adv: consider outgoing interface in OGM sending
The current OGM sending an aggregation functionality decides on which interfaces a packet should be sent when it parses the forward packet struct. However, with the network wide multi interface optimization the outgoing interface is decided by the OGM processing function.
This is reflected by moving the decision in the OGM processing function and add the outgoing interface in the forwarding packet struct. This practically implies that an OGM may be added multiple times (once per outgoing interface), and this also affects aggregation which needs to consider the outgoing interface as well.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 46e44fdb96ef75e22134c29de5a1191240b6ca1f Author: Simon Wunderlich simon@open-mesh.com Date: Wed Nov 13 19:14:48 2013 +0100
batman-adv: add WiFi penalty
If the same interface is used for sending and receiving, there might be throughput degradation on half-duplex interfaces such as WiFi. Add a penalty if the same interface is used to reflect this problem in the metric. At the same time, change the hop penalty from 30 to 15 so there will be no change for single wifi mesh network. the effective hop penalty will stay at 30 due to the new wifi penalty for these networks.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b Author: Simon Wunderlich simon@open-mesh.com Date: Wed Nov 13 19:14:47 2013 +0100
batman-adv: split out router from orig_node
For the network wide multi interface optimization there are different routers for each outgoing interface (outgoing from the OGM perspective, incoming for payload traffic). To reflect this, change the router and associated data to a list of routers.
While at it, rename batadv_orig_node_get_router() to batadv_orig_router_get() to follow the new naming scheme.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 9bb33b8d88e318c4879d37d06ad28e3e018b9036 Author: Simon Wunderlich simon@open-mesh.com Date: Wed Nov 13 19:14:46 2013 +0100
batman-adv: split tq information in neigh_node struct
For the network wide multi interface optimization it is required to save metrics per outgoing interface in one neighbor. Therefore a new type is introduced to keep interface-specific information. This also requires some changes in access and list management.
The compare and equiv_or_better API calls are changed to take the outgoing interface into consideration.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit dc5b9ca48b74df737fd8ca8d6d774e16fc863172 Author: Simon Wunderlich simon@open-mesh.com Date: Wed Nov 13 19:14:45 2013 +0100
batman-adv: remove bonding and interface alternating
Remove bonding and interface alternating code - it will be replaced by a new, network-wide multi interface optimization which enables both bonding and interface alternating in a better way.
Keep the sysfs and find router function though, this will be needed later.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2948e58fa58069425342d47796e73e4988a0c8c4 Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Nov 19 08:36:29 2013 +0100
batman-adv: add missing sysfs attributes to README
Add missing sysfs attributes in the proper section of the README
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 28855a6545fc0ba2521708a4204fc1d10f393716 Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Nov 19 08:26:07 2013 +0100
batman-adv: add compat code for kstrtou32
kstrtou32() does not exist before 2.6.39. Convert it to strict_strtoul() in that case.
Used-by: e29249b4483b91d7a590a16e9b5ffe9412ce7fde ("batman-adv: add isolation_mark sysfs attribute")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2826f303efcd5b01238eb54b9ba9e700aa86ffb0 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Nov 16 23:02:51 2013 +0100
batman-adv: remove returns at the end of void functions
Return at the end of void functions is not needed.
Since most of the void functions in the code do not do so, make all the others consistent by removing the useless returns. Actually all the functions to be "fixed" are in network-coding.h only.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6fa38a2c72cc79dd961a6d9ed00d32e1c308b448 Author: Antonio Quartulli antonio@open-mesh.com Date: Sat Nov 16 12:03:52 2013 +0100
batman-adv: set the isolation mark in the skb if needed
If a broadcast packet is coming from a client marked as isolated, then mark the skb using the isolation mark so that netfilter (or any other application) can recognise them.
The mark is written in the skb based on the mask value: only bits set in the mask are substitued by those in the mark value
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit ceb002ca45285675d74d5cd9b8bca8f333638304 Author: Antonio Quartulli antonio@open-mesh.com Date: Sat Nov 16 12:03:51 2013 +0100
batman-adv: create helper function to get AP isolation status
The AP isolation status may be evaluated in different spots. Create an helper function to avoid code duplication.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit ae95c4e06d51c1f3a5a96df94d3d6199d30e60dc Author: Antonio Quartulli antonio@open-mesh.com Date: Sat Nov 16 12:03:50 2013 +0100
batman-adv: extend the ap_isolation mechanism
Change the AP isolation mechanism to not only "isolate" WIFI clients but also all those marked with the more generic "isolation flag" (BATADV_TT_CLIENT_ISOLA).
The result is that when AP isolation is on any unicast packet originated by an "isolated" client and directed to another "isolated" client is dropped at the source node.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit febf510783ae29ddd42405bb89ed25d37f086e5f Author: Antonio Quartulli antonio@open-mesh.com Date: Sat Nov 16 12:03:49 2013 +0100
batman-adv: print the new BATADV_TT_CLIENT_ISOLA flag
Print the new BATADV_TT_CLIENT_ISOLA flag properly in the Local and Global Translation Table output.
The character 'I' is used in the flags column to indicate that the entry is marked as isolated.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a8c0e75cc2880c93eea98695ab1dfa94d249c5e9 Author: Antonio Quartulli antonio@open-mesh.com Date: Sat Nov 16 12:03:48 2013 +0100
batman-adv: mark a local client as isolated when needed
A client sending packets which mark matches the value configured via sysfs has to be identified as isolated using the TT_CLIENT_ISOLA flag.
The match is mask based, meaning that only bits set in the mask are compared with those in the mark value.
If the configured mask is equal to 0 no operation is performed.
Such flag is then advertised within the classic client announcement mechanism.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e29249b4483b91d7a590a16e9b5ffe9412ce7fde Author: Antonio Quartulli antonio@open-mesh.com Date: Sat Nov 16 12:03:47 2013 +0100
batman-adv: add isolation_mark sysfs attribute
This attribute can be used to set and read the value and the mask of the skb mark which will be used to classify the source non-mesh client as ISOLATED. In this way a client can be advertised as such and the mark can potentially be restored at the receiving node before delivering the skb.
This can be helpful for creating network wide netfilter policies.
This sysfs file expects a string of the shape "$mark/$mask". Where $mark has to be a 32-bit number in any base, while $mask must be a 32bit mask expressed in hex base. Only bits in $mark covered by the bitmask are really stored.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2d5b555644b22e171f3e0486abc0c2e627452d14 Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Nov 5 19:31:08 2013 +0100
batman-adv: send every DHCP packet as bat-unicast
In different situations it is possible that the DHCP server or client uses broadcast Ethernet frames to send messages to each other. The GW component in batman-adv takes care of using bat-unicast packets to bring broadcast DHCP Discover/Requests to the "best" server.
On the way back the DHCP server usually sends unicasts, but upon client request it may decide to use broadcasts as well.
This patch improves the GW component so that it now snoops and sends as unicast all the DHCP packets, no matter if they were generated by a DHCP server or client.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit bcc2666056677af3af385b667e17db8b99547e39 Author: Antonio Quartulli antonio@meshcoding.com Date: Tue Nov 5 10:02:31 2013 +0100
batman-adv: fix multi-line comment
Introduced by 99a6eb50ef5066e125cedb97bc0fcfcdff4f08cc ("batman-adv: deselect current GW on client mode switch off")
Reported-by: Marek Lindner mareklindner@neomailbox.ch Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e6198c4bf6f6ae9cfe8f79a989ebdbf45afc27e2 Author: Antonio Quartulli antonio@meshcoding.com Date: Thu Nov 7 08:02:07 2013 +0100
batman-adv: remove parenthesis from return statements
Remove parenthesis around return expression as suggested by checkpatch.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 65afe857341f0b7bf3223094bfc124d50f19da7b Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Nov 4 20:59:41 2013 +0100
batman-adv: rename gw_deselect() to gw_reselect()
The function batadv_gw_deselect() is actually not deselecting anything. It is just informing the GW code to perform a re-election procedure when possible. The current gateway is not being touched at all and therefore the name of this function is rather misleading.
Rename it to batadv_gw_reselect() to batadv_gw_reselect() to make its behaviour easier to grasp.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 99a6eb50ef5066e125cedb97bc0fcfcdff4f08cc Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Nov 4 20:59:40 2013 +0100
batman-adv: deselect current GW on client mode switch off
When switching from gw_mode client to either off or server the current selected gateway has to be deselected. In this way when client mode is enabled again a gateway re-election is forced and a GW_ADD event is consequently sent.
The current behaviour instead is to keep the current gateway leading to no GW_ADD event when gw_mode client is selected for a second time
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c2a8e168c0ae7d23803ff6a09d25a28dfaa57d58 Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Nov 3 20:40:48 2013 +0100
batman-adv: remove FSF address from GPL disclaimer
As suggested by checkpatch, remove all the references to the FSF address since the kernel already has one reference in its documentation.
In this way it is easier to update it in case of future changes.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 2138883c56a6c983a7f04e0253bac68abad4725a Merge: f917087 03b50b5 Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Oct 23 15:30:39 2013 +0200
Merge commit '03b50b510c3df2d9dc65dccafb021a5c49e66e0e' into merge/master
commit 24c51de20cce1d04dcac5823345811f891f29f5a Merge: 46ac6db 03b50b5 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Oct 23 14:39:21 2013 +0800
Merge branch 'next'
commit 03b50b510c3df2d9dc65dccafb021a5c49e66e0e Author: Antonio Quartulli antonio@meshcoding.com Date: Wed Oct 23 08:22:56 2013 +0200
batman-adv: remove blank line before bracket
Fix a style error introduced by bb69cb678d37144842cb66ee5afd0031c3e412a2 ("batman-adv: generalize batman-adv icmp packet handling")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 46ac6db18daf23ff151a29b6733556d87ad8c057 Merge: 9b5d4ed bb69cb6 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Oct 23 05:00:31 2013 +0800
Merge branch 'next'
commit bb69cb678d37144842cb66ee5afd0031c3e412a2 Author: Simon Wunderlich sw@simonwunderlich.de Date: Tue Oct 22 22:50:09 2013 +0200
batman-adv: generalize batman-adv icmp packet handling
Instead of handling icmp packets only up to length of icmp_packet_rr, the code should handle any icmp length size. Therefore the length truncating is moved to when the packet is actually sent to userspace (this does not support lengths longer than icmp_packet_rr yet). Longer packets are forwarded without truncating.
This patch also cleans up some parts where the icmp header struct could be used instead of other icmp_packet(_rr) structs to make the code more readable.
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6f5f053aca86cc40f1639b1dd8b3f84586f3d6bc Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Oct 19 23:29:00 2013 +0200
batman-adv: fix small glitch in comment
Introduced by e4ff5c153dab054a6cd1c4132f87bc5e77127456 ("batman-adv: add sysfs framework for VLAN")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f917087f1bdbd432cab308736246780911dbff1b Merge: ba48216 c619e84 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Oct 19 23:22:50 2013 +0200
Merge commit 'c619e84e24748f7eefa0aa5aaf62fd8e028a827e' into merge/master
commit 9b5d4ed56e648c254ac57049cba9993f5f56988d Merge: 5c3abe0 c619e84 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Oct 20 04:22:33 2013 +0800
Merge branch 'next'
commit c619e84e24748f7eefa0aa5aaf62fd8e028a827e Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Oct 19 17:04:14 2013 +0200
batman-adv: fix typ0s in comment and kerneldoc
Introduced by 21a57f6e7a3b4455dfe68ee07a7b901d9e7f200b ("batman-adv: make the TT CRC logic VLAN specific")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e00f5628efc42bf0ebb113471f782d4b3ac44315 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Oct 19 16:14:49 2013 +0200
batman-adv: fix typ0 in kernel doc
Introduced by 9a40777e03bb2710a4f716867b2153257098972f ("batman-adv: make the GW module correctly talk to the new VLAN-TT")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 148fc50b41105f7129ac44f36edd527c91a63a08 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Oct 19 15:23:42 2013 +0200
batman-adv: fix arguments order when calling tt_local_add
Introduced by c018ad3de61a1dc4194879a53e5559e094aa7b1a ("batman-adv: add the VLAN ID attribute to the TT entry")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit ba4821616ed609ebfe9d9cd412abee38cc69dd93 Merge: dc022b0 d964188 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Oct 19 11:48:23 2013 +0200
Merge commit 'd96418873f2e27fb94d6c40f274e06ff59dfbd6e' into merge/master
Conflicts: net/batman-adv/CHANGELOG net/batman-adv/Makefile.kbuild net/batman-adv/README net/batman-adv/README.external net/batman-adv/compat.c net/batman-adv/compat.h net/batman-adv/main.h net/batman-adv/sysfs-class-net-batman-adv net/batman-adv/sysfs-class-net-mesh
commit dc022b04e2d5c6ffed69b77941a40908efe4ef81 Merge: 4ffe28f 272b98c Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Oct 19 11:28:54 2013 +0200
Merge tag 'v3.12-rc1' into merge/master
Linux 3.12-rc1
commit 5c3abe0701db7bf23acc817feb6d7c8be3055cd7 Merge: 60087ff d964188 Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Oct 14 18:04:17 2013 +0200
Merge remote-tracking branch 'origin/next'
commit d96418873f2e27fb94d6c40f274e06ff59dfbd6e Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Oct 14 18:01:01 2013 +0200
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 0f8cea6cfcfc2bcc066f351abcf1701480f6f8c7 Merge: 05d4de2 f5e3096 Author: Simon Wunderlich sw@simonwunderlich.de Date: Mon Oct 14 17:58:37 2013 +0200
Merge branch 'maint' into next
commit 05d4de2248d32dee5d5033d8a707fc9ad2a0890b Author: Antonio Quartulli antonio@open-mesh.com Date: Sun Oct 13 02:50:20 2013 +0200
batman-adv: include the sync-flags when compute the global/local table CRC
Flags covered by TT_SYNC_MASK are kept in sync among the nodes in the network and therefore they have to be considered while computing the global/local table CRC.
In this way a generic originator is able to understand if its table contains the correct flags or not.
Bits from 4 to 7 in the TT flags fields are now reserved for "synchronized" flags only.
This allows future developers to add more flags of this type without breaking compatibility.
It's important to note that not all the remote TT flags are synchronised. This comes from the fact that some flags are used to inject an information once only.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e0eb5f8df352c4254080a431e858828e88f8b5cd Author: Antonio Quartulli antonio@open-mesh.com Date: Sun Oct 13 02:50:19 2013 +0200
batman-adv: improve the TT component to support runtime flag changes
Some flags (i.e. the WIFI flag) may change after that the related client has already been announced. However it is useful to informa the rest of the network about this change.
Add a runtime-flag-switch detection mechanism and re-announce the related TT entry to advertise the new flag value.
This mechanism can be easily exploited by future flags that may need the same treatment.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f7391e914f4deba62f9960a8a3b8eb016f89481d Author: Antonio Quartulli antonio@open-mesh.com Date: Sun Oct 13 02:50:18 2013 +0200
batman-adv: invoke dev_get_by_index() outside of is_wifi_iface()
Upcoming changes need to perform other checks on the incoming net_device struct.
To avoid performing dev_get_by_index() for each and every check, it is better to move it outside of is_wifi_iface() and search the netdev object once only.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 60087ff88fdbb8b6f88a7ab7d4b9a5654c59f592 Author: Antonio Quartulli antonio@open-mesh.com Date: Sun Oct 13 02:50:17 2013 +0200
batman-adv: don't switch byte order too often if not needed
If possible, operations like ntohs/ntohl should not be performed too often. Use a variable to locally store the converted value and then use it.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit cb1d05d180fecf2d53bcd89d46c668d635d04bdc Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Oct 13 23:02:45 2013 +0200
batman-adv: properly rename define in distributed arp table header file
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit f5e3096f8f7e4135a651a2b0cb78ae1ba1dc805f Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sun Jul 21 23:03:15 2013 +0200
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 89dc98270922b2ad40d953ad6702a903dd2f6df5 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sat Oct 12 22:10:03 2013 +0800
batman-adv: update email address for Marek Lindner
Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 6b0bfa00180665ac983816e16c9bf21485d405cb Author: Simon Wunderlich sw@simonwunderlich.de Date: Sun Oct 13 19:04:25 2013 +0200
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 4eea14cd61f3b78e830898b6cf08e6fac0929fd5 Author: Simon Wunderlich sw@simonwunderlich.de Date: Sun Oct 13 19:03:53 2013 +0200
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
commit 712a23ebf8db7c58bb7788563f1bba937c49df15 Author: Antonio Quartulli antonio@meshcoding.com Date: Sat Oct 12 16:17:36 2013 +0200
batman-adv: fix typ0 in ICMP header kernel doc
Introduced by 1897ab719862eb43e0a6edd3a20b8d9fa7a2173d ("batman-adv: create common header for ICMP packets")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e89a9f965035165a839a94719cf841ca674bcfb4 Author: Antonio Quartulli antonio@meshcoding.com Date: Fri Oct 11 08:30:30 2013 +0200
batman-adv: update email address for Antonio Quartulli
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 512b7358f200856ef27f04cb3b441b7d550d340d Author: Simon Wunderlich sw@simonwunderlich.de Date: Thu Oct 10 23:59:10 2013 +0200
batman-adv: update email address for Simon Wunderlich
My university will stop email service for alumni in january 2014, please use my new e-mail address instead.
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 43387606fa225aead0faa126ecd94b3af3656d4d Merge: 17a6a8c 227df84 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Oct 9 16:15:10 2013 +0800
Merge branch 'maint' into next
commit 227df84f96206b2b26cecdc3d5d75d0ab675f577 Author: Simon Wunderlich simon@open-mesh.com Date: Thu Oct 3 23:02:13 2013 +0200
batman-adv: fix compat of net_ratelimited_function for >3.2.46
Appearently net_ratelimited_function was added to the stable series of from 3.2.47, which results in a lot of warnings when compiling against this kernel. This patch avoids this redefinition.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 17a6a8c33c602fd9b495f5878895449e62361b6f Merge: 4e1f729 586cf84 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Sep 30 23:20:26 2013 +0800
Merge branch 'maint' into next
Conflicts: network-coding.c network-coding.h
commit 586cf84b0ce6f9e8faa95e5f435de4be49a7eb88 Author: Matthias Schiffer mschiffer@universe-factory.net Date: Fri Sep 27 18:03:39 2013 +0200
batman-adv: set up network coding packet handlers during module init
batman-adv saves its table of packet handlers as a global state, so handlers must be set up only once (and setting them up a second time will fail).
The recently-added network coding support tries to set up its handler each time a new softif is registered, which obviously fails when more that one softif is used (and in consequence, the softif creation fails).
Fix this by splitting up batadv_nc_init into batadv_nc_init (which is called only once) and batadv_nc_mesh_init (which is called for each softif); in addition batadv_nc_free is renamed to batadv_nc_mesh_free to keep naming consistent.
Signed-off-by: Matthias Schiffer mschiffer@universe-factory.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4e1f729f4151256f348fc7ec7884bfd24c338783 Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Sep 22 15:45:07 2013 +0200
batman-adv: remove accidentally re-introduced unicast.c file
During the Fragmentation redesign the unicast.c file has been removed, but it seems that it has been accidentally re-introduced during a merge operation. Remove it again.
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit e65bb3664fed68362d1ec4ae2fd2d2e24e56c8a9 Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Aug 19 18:39:59 2013 +0200
batman-adv: send GW_DEL event in case of soft-iface destruction
In case of soft_iface destruction send a GW DEL event to userspace so that applications which are listening for GW events are informed about the lost of connectivity and can react accordingly.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 390858d6b6e5219493dc8c95a526046cbafecdbb Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Sep 22 19:30:36 2013 +0200
batman-adv: properly format kernel doc
Introduced by: 0b6aa0d43767889eeda43a132cf5e73df4e63bf2 ("batman-adv: tvlv - basic infrastructure")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit b34050b2ff060179d0a7ad5a094a978fbb049fcc Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Sep 22 20:02:22 2013 +0200
batman-adv: make gw_init() return void
gw_init does not return anything other than 0 (despite the kernel doc says something different..). Change it to void and fix the kernel doc.
Introduced-by 0853ec7fafe0a195754454832993c6b35e22b842 ("batman-adv: tvlv - gateway download/upload bandwidth container")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 8b3e7b919388fd825d14b9caa751932913ed4ca5 Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Sep 22 20:08:25 2013 +0200
batman-adv: fix usage and declaration of batadv_bandwidth_units
Name in declaration does not reflect the one reporte din the kernel doc. Moreover a variable storing an enum should be of type enum rather than int (this helps the compiler to spott possible mistakes)
Introduced by 0853ec7fafe0a195754454832993c6b35e22b842 ("batman-adv: tvlv - gateway download/upload bandwidth container")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 4e458f43e4941dbe8a0b52e6d0fb36bc4423a9b8 Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Sep 22 20:18:28 2013 +0200
batman-adv: fix orig capabilities numbering (NetCod)
Use bit 1 after bit 0.
Introduced by 7dd9d8992b0c197ba656a6d9a70966cea10fc2d9 ("batman-adv: tvlv - add network coding container")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a5aa462a4f2d323c3d727f8f75ef87b34ed666f6 Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Sep 22 20:18:27 2013 +0200
batman-adv: fix orig capabilities numbering
Let's start the capabilities from bit 0.
Introduced by 2b1c07b918d2acc41555bbde9d538179acb308b4 ("batman-adv: tvlv - add distributed arp table container")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 96cebefc9faee1fe615bcb3a38877d8d5403b313 Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Sep 22 20:26:50 2013 +0200
batman-adv: no need for return in void functions
Only network-coding.h is using "return;" inside void stub functions. This is not a consistent with the rest of the code, therefore don't continue to do as such. (Other stub functions will be cleaned later)
Introduced by 7dd9d8992b0c197ba656a6d9a70966cea10fc2d9 ("batman-adv: tvlv - add network coding container")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit 75b99c860677dc35548afd26c6f32fcfe8a43c5d Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Sep 22 21:19:03 2013 +0200
batman-adv: fix wrong kernel doc
The name of the function does not match the kernel doc. Fix it.
Introduced by 6228419df3a53d09a2ba1f3e7b32bcd7cd59c968 ("batman-adv: tvlv - convert tt query packet to use tvlv unicast packets")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit c72c2785cdee4378ab0f4e241e717a224bf00c1e Merge: a468009 a1770e4 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Sep 17 23:25:32 2013 +0000
Merge branch 'next'
Conflicts: soft-interface.c
commit a1770e4175216da728d05e7ea50d9c2765b74858 Merge: d9316dd 5922104 Author: Marek Lindner mareklindner@neomailbox.ch Date: Tue Sep 17 22:14:34 2013 +0000
Merge branch 'maint' into next
commit 59221041095c2b83205caab3dbabc94d7a6f32f9 Author: Antonio Quartulli antonio@open-mesh.com Date: Wed Sep 11 19:14:44 2013 +0200
batman-adv: set the TAG flag for the vid passed to BLA
When receiving or sending a packet a packet on a VLAN, the vid has to be marked with the TAG flag in order to make any component in batman-adv understand that the packet is coming from a really tagged network.
This fix the Bridge Loop Avoidance behaviour which was not able to send announces over VLAN interfaces.
Introduced by 0b1da1765fdb00ca5d53bc95c9abc70dfc9aae5b ("batman-adv: change VID semantic in the BLA code")
Signed-off-by: Antonio Quartulli antonio@open-mesh.org Acked-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
commit a4680099ae5947f4a5360910ccb7da958d684b9c Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Sep 3 11:10:24 2013 +0200
batman-adv: adapt the TT component to use the new API functions
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit fdafa7d29ace95f1759ce19dcff2a14e471d26da Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Sep 3 11:10:23 2013 +0200
batman-adv: provide orig_node routing API
Some operations executed on an orig_node depends on the current routing algorithm being used. To easily make this mechanism routing algorithm agnostic add a orig_node specific API that each algorithm can populate with its own routines.
Such routines are then invoked by the code when needed, without knowing which routing algorithm is currently in use
With this patch 3 API functions are added: - orig_free (to free routing depending internal structs) - orig_add_if (to change the inner state of an orig_node when a new hard interface is added) - orig_del_if (to change the inner state of an orig_node when an hard interface is removed)
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit f7f2fe494388fca828094a4ebdab918a7b2d64f8 Author: Marek Lindner lindner_marek@yahoo.de Date: Mon May 27 15:33:25 2013 +0800
batman-adv: limit local translation table max size
The local translation table size is limited by what can be transferred from one node to another via a full table request.
The number of entries fitting into a full table request depend on whether the fragmentation is enabled or not. Therefore this patch introduces a max table size check and refuses to add more local clients when that size is reached. Moreover, if the max full table packet size changes (MTU change or fragmentation is disabled) the local table is downsized instantaneously.
Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Antonio Quartulli ordex@autistici.org
commit 1c605f0b46a8b7d67d8b535b691508227cf63311 Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Sep 2 12:15:07 2013 +0200
batman-adv: adapt the neighbor purging routine to use the new API functions
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit a64108267584ff22fafe0913744d9d1aee93913a Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Sep 2 12:15:06 2013 +0200
batman-adv: adapt bonding to use the new API functions
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 51e42c810d30044cfb270aca101c303689870404 Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Sep 2 12:15:05 2013 +0200
batman-adv: add bat_neigh_is_equiv_or_better API function
Each routing protocol has its own metric semantic and therefore is the protocol itself the only component able to compare two metrics to check their "similarity".
This new API allows each routing protocol to implement its own logic and make the external code protocol agnostic.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 819b6c17bd720a05dfd7193d72a0872fb53ad078 Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Sep 2 12:15:04 2013 +0200
batman-adv: add bat_neigh_cmp API function
This new API allows to compare the two neighbours based on the metric avoiding the user to deal with any routing algorithm specific detail
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit e675e2e908b949132481c064e2b914cfd6edcc4d Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Sep 2 12:15:03 2013 +0200
batman-adv: add bat_orig_print API function
Each routing protocol has its own metric and private variables, therefore it is useful to introduce a new API for originator information printing.
This API needs to be implemented by each protocol in order to provide its specific originator table output.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9e696f778513668d121a1ea4f8136d6bac36624b Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Sep 2 12:15:02 2013 +0200
batman-adv: make struct batadv_orig_node algorithm agnostic
some of the struct batadv_orig_node members are B.A.T.M.A.N. IV specific and therefore they are moved in a algorithm specific substruct in order to make batadv_orig_node routing algorithm agnostic
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit c82dc0db85fb4f0a0c5e65a8927051e5b7e7b8b5 Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Sep 2 12:15:01 2013 +0200
batman-adv: make struct batadv_neigh_node algorithm agnostic
some of the fields in struct batadv_neigh_node are strictly related to the B.A.T.M.A.N. IV algorithm. In order to make the struct usable by any routing algorithm it has to be split and made more generic
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 7c2dbb87e2cca89ec0724bb718df65a7c261a7c3 Merge: 53c6c26 d9316dd Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Sep 2 14:17:27 2013 +0800
Merge branch 'next'
commit d9316dd4b58cddbf1919a13cbddb67d2f98f3199 Author: Joe Perches joe@perches.com Date: Sun Sep 1 15:45:08 2013 -0700
batman: Remove reference to compare_ether_addr
This function is being removed, rename the reference.
Signed-off-by: Joe Perches joe@perches.com Acked-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 53c6c262a581b76c15f8e64c0ced1621f0773c13 Author: Antonio Quartulli ordex@autistici.org Date: Thu Aug 22 09:21:13 2013 +0200
batman-adv: tag locally generated ARP reply if needed
When DAT replies to a client laying on a VLAN it has to attach to the packet the proper VLAN tag.
Introduced by: 3e26722bc9f248ec4316749fc1957365c0fa5e4b ("batman-adv: make the Distributed ARP Table vlan aware")
Reported-by: Marco Dalla Torre marco.dallato@gmail.com Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit ae6b6b3f7bd7be5a89258bbb9c27f265c9995f5a Author: Antonio Quartulli ordex@autistici.org Date: Thu Aug 22 09:21:12 2013 +0200
batman-adv: fix ARP header parsing in DAT
In case of VLAN packets flowing into the DAT module, the parsing routines have to consider the correct header size when accessing an ARP packet.
Introduced by: 3e26722bc9f248ec4316749fc1957365c0fa5e4b ("batman-adv: make the Distributed ARP Table vlan aware")
Reported-by: Marco Dalla Torre marco.dallato@gmail.com Signed-off-by: Antonio Quartulli ordex@autistici.org Tested-by: Marco Dalla Torre marco.dallato@gmail.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 19c31e88ebaf8c7f0ed2d25097514623cd91269d Author: Antonio Quartulli ordex@autistici.org Date: Thu Aug 22 09:21:11 2013 +0200
batman-adv: print the VID in the dat_cache output
Now that DAT is vlan aware, it should also print the VID along with the MAC address of each cached entry.
Introduced by: 3e26722bc9f248ec4316749fc1957365c0fa5e4b ("batman-adv: make the Distributed ARP Table vlan aware")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 00f215185878bbb102ec527c3bc1bf64c108dd10 Author: Antonio Quartulli antonio@open-mesh.com Date: Thu Aug 15 23:05:55 2013 +0200
batman-adv: check if a softif_vlan already exists
Before creating a new softif_vlan it is better to check if that does already exist. If so batman-adv should refuse to create a new structure otherwise this would lead to an inconsistent state.
Normally this is not a problem because the operating system will prevent from creating the same vlan twice, but some ancient kernels exhibited an improper behaviour that led to a bug.
Introduced by 952cebb57518ec18dfdebfcb2b85539f58f20779 ("batman-adv: add per VLAN interface attribute framework")
Reported-by: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de Tested-by: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de
commit 4ffe28ffec5b1393e819256e30925144c1105c5e Merge: 40a5633 ad81f05 Author: Antonio Quartulli ordex@autistici.org Date: Mon Aug 19 19:10:12 2013 +0200
Merge tag 'v3.11-rc1' into merge/master
Linux 3.11-rc1
Signed-off-by: Antonio Quartulli ordex@autistici.org
Conflicts: net/batman-adv/bat_iv_ogm.c net/batman-adv/icmp_socket.c net/batman-adv/main.h net/batman-adv/routing.c net/batman-adv/translation-table.c net/batman-adv/vis.c
commit 429b406c47d88f0c73e1deb6b0dc1c6eeb867cda Merge: e854b27 03d44fa Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Aug 18 22:07:38 2013 +0800
Merge branch 'next'
commit 03d44fa676c1a4a8df519536af29d62d95132ea0 Merge: 6944741 e39bc52 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Aug 18 22:06:51 2013 +0800
Merge branch 'maint' into next
commit e39bc52671fb33e7d79e58cd5838be75e12abeb8 Author: Antonio Quartulli ordex@autistici.org Date: Sun Aug 18 12:40:03 2013 +0200
batman-adv: fix variable name in compat code
compat code introduced by 0d941e82ab5f92faf33bee6abdde519056f3ac2d ("batman-adv: Unmap fragment page once iterator is done") is declaring a variable having the same name of one used in the batman-adv code. Rename it to prevent sparse warnings.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit e854b270a0c1efffa0ec93648640ff5e77a7521c Merge: 2cc9694 6944741 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Aug 18 02:07:20 2013 +0800
Merge branch 'next'
commit 694474198d970956c6293bc4d5f3772c02bb9144 Merge: 74fa2e6 0d941e8 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Aug 18 02:04:26 2013 +0800
Merge branch 'maint' into next
commit 0d941e82ab5f92faf33bee6abdde519056f3ac2d Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Wed Jun 26 11:37:51 2013 +0200
batman-adv: Unmap fragment page once iterator is done
Callers of skb_seq_read() are currently forced to call skb_abort_seq_read() even when consuming all the data because the last call to skb_seq_read (the one that returns 0 to indicate the end) fails to unmap the last fragment page.
With this patch callers will be allowed to traverse the SKB data by calling skb_prepare_seq_read() once and repeatedly calling skb_seq_read() as originally intended (and documented in the original commit 677e90eda), that is, only call skb_abort_seq_read() if the sequential read is actually aborted.
Signed-off-by: Wedson Almeida Filho wedsonaf@gmail.com Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 2cc96940a89d13086210e3cca701e93932f9852d Author: Antonio Quartulli ordex@autistici.org Date: Sat Aug 10 12:57:27 2013 +0200
batman-adv: properly print the VID in DAT
Make the DAT code use the PRINT_VID macro to print the VIDs.
Introduced by 3e26722bc9f248ec4316749fc1957365c0fa5e4b ("batman-adv: make the Distributed ARP Table vlan aware")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 40a5633f83ee6a4861889828aac29605e6f984ed Merge: ce223ee 74fa2e6 Author: Antonio Quartulli ordex@autistici.org Date: Sun Aug 11 10:47:11 2013 +0200
Merge remote-tracking branch 'pkg/next' into merge/master
Signed-off-by: Antonio Quartulli ordex@autistici.org
Conflicts: net/batman-adv/CHANGELOG net/batman-adv/README.external net/batman-adv/compat.h
commit 5af869e10857764c2a61559ec66176eb533a9ceb Author: Antonio Quartulli antonio@open-mesh.com Date: Wed Aug 7 18:28:56 2013 +0200
batman-adv: make the backbone gw check VLAN specific
The backbone gw check has to be VLAN specific so that code using it can specify VID where the check has to be done.
In the TT code, the check has been moved into the tt_global_add() function so that it can be performed on a per-entry basis instead of ignoring all the TT data received from another backbone node. Only TT global entries belonging to the VLAN where the backbone node is connected to are skipped. All the other spots where the TT code was checking whether a node is a backbone have been removed.
Moreover, batadv_bla_is_backbone_gw_orig() now returns bool since it used to return only 1 or 0.
Cc: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 8944ede0509f6dd5e89a1c33bbe5d485e0ccaf3e Author: Antonio Quartulli antonio@open-mesh.com Date: Wed Aug 7 18:28:55 2013 +0200
batman-adv: make the TT global purge routine VLAN specific
Instead of unconditionally removing all the TT entries served by a given originator, make tt_global_orig_del() remove only entries matching a given VLAN identifier provided as argument.
If such argument is negative all the global entries served by the originator are removed.
This change is used into the BLA code to purge entries served by a newly discovered Backbone node, but limiting the operation only to those connected to the VLAN where the backbone has been discovered.
Cc: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9aa63fb3a45bd799c79092b200c7394aa3a972ab Merge: 6190d33 74fa2e6 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Aug 8 19:37:39 2013 +0800
Merge branch 'next'
commit 74fa2e6070e8934f31c9b08b801e104355e51c3b Author: Antonio Quartulli ordex@autistici.org Date: Thu Aug 8 01:18:19 2013 +0200
batman-adv: use proper network order conversion
Introduced by eb7643628a608cb338d48d298ce7ca15fadfb239 ("batman-adv: set skb priority according to content")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 6190d33742ccd45eea189bfc6edd63dbfa0940fe Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Aug 8 12:58:46 2013 +0800
batman-adv: fix compat compile error
Introduced by e4ff5c153dab054a6cd1c4132f87bc5e77127456 ("batman-adv: add sysfs framework for VLAN")
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 732d7c1969153083ccf189df83748f8d12fad8aa Author: Antonio Quartulli antonio@open-mesh.com Date: Thu Aug 8 10:37:37 2013 +0200
batman-adv: fix memory leak in batadv_softif_create_vlan()
Introduced by e4ff5c153dab054a6cd1c4132f87bc5e77127456 ("batman-adv: add sysfs framework for VLAN")
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 441896e313a861cac6bd43f1966815d713530bb6 Merge: 21a57f6 eb76436 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Aug 8 01:09:52 2013 +0800
Merge branch 'next'
Conflicts: main.c main.h routing.c send.c translation-table.c vis.c
commit eb7643628a608cb338d48d298ce7ca15fadfb239 Author: Simon Wunderlich simon@open-mesh.com Date: Mon Jul 29 17:56:44 2013 +0200
batman-adv: set skb priority according to content
The skb priority field may help the wireless driver to choose the right queue (e.g. WMM queues). This should be set in batman-adv, as this information is only available here.
This patch adds support for IPv4/IPv6 DS fields and VLAN PCP. Note that only VLAN PCP is used if a VLAN header is present. Also initially set TC_PRIO_CONTROL only for self-generated packets, and keep the priority set by higher layers.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 21a57f6e7a3b4455dfe68ee07a7b901d9e7f200b Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Jul 30 22:16:25 2013 +0200
batman-adv: make the TT CRC logic VLAN specific
This change allows nodes to handle the TT table on a per-VLAN basis. This is needed because nodes may have to store only some of the global entries advertised by another node.
In this scenario such nodes would re-create only a partial global table and would not be able to compute a correct CRC anymore.
This patch splits the logic and introduces one CRC per VLAN. In this way a node fetching only some entries belonging to some VLANs is still able to compute the needed CRCs and still check the table correctness.
With this patch the shape of the TVLV-TT is changed too because now a node needs to advertise all the CRCs of all the VLANs that it is wired to.
The debug output of the local Translation Table now shows the CRC along with each entry since there is not a common value for the entire table anymore.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 1583626119e5441dac7c058ce487690a6d7af04a Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Jul 30 22:16:24 2013 +0200
batman-adv: lock around TT operations to avoid sending inconsistent data
A TT response may be prepared and sent while the local or global translation table is getting updated.
The worst case is when one of the tables is accessed after its content has been recently updated but the metadata (TTVN/CRC) has not yet. In this case the reader will get a table content which does not match the TTVN/CRC. This will lead to an inconsistent state and so to a TT recovery.
To avoid entering this situation, put a lock around those TT operations recomputing the metadata and around the TT Response creation (the latter is the only reader that accesses the metadata together with the table).
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit d2995e968a6b9c397bb37c030ed669038492e9d4 Merge: a90037d 974dfa5 Author: Marek Lindner lindner_marek@yahoo.de Date: Wed Aug 7 19:24:21 2013 +0800
Merge branch 'next'
Conflicts: gateway_client.c unicast.c
commit 974dfa5e21e4f2b6540b44485e2f386751c7806f Merge: d781a70 c98c3e5 Author: Marek Lindner lindner_marek@yahoo.de Date: Wed Aug 7 19:18:14 2013 +0800
Merge branch 'maint' into next
Conflicts: unicast.c
commit c98c3e521913b8dd5fee4d3b90dc9ed7a47e5bee Author: Linus Lüssing linus.luessing@web.de Date: Tue Aug 6 20:21:15 2013 +0200
batman-adv: fix potential kernel paging errors for unicast transmissions
There are several functions which might reallocate skb data. Currently some places keep reusing their old ethhdr pointer regardless of whether they became invalid after such a reallocation or not. This potentially leads to kernel paging errors.
This patch fixes these by refetching the ethdr pointer after the potential reallocations.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit a90037de84f9f53522bd98bea0c34307a16c5701 Merge: 24a3b14 d781a70 Author: Marek Lindner lindner_marek@yahoo.de Date: Fri Aug 2 12:09:46 2013 +0800
Merge branch 'next'
Conflicts: unicast.c
commit d781a70df220815765328b35173d078b8226405e Author: Linus Lüssing linus.luessing@web.de Date: Sat Jul 27 03:24:44 2013 +0200
batman-adv: check return type of unicast packet preparations
batadv_unicast(_4addr)_prepare_skb might reallocate the skb's data. And if it tries to do so then this can potentially fail.
We shouldn't continue working on this skb in such a case.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Antonio Quartulli ordex@autistici.org
commit 24a3b14d9f84269e0afbecea635b8ffe5a3f8173 Merge: 2bde624 a86bb54 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sun Jul 21 23:05:52 2013 +0200
Merge branch 'next'
commit a86bb54721fb8155cf4ecb363d93efa4e656d1d7 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sun Jul 21 23:03:15 2013 +0200
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 2bde624fc235deff03efde1caf98962da0127a40 Author: Antonio Quartulli antonio@open-mesh.com Date: Sat Jul 13 00:06:00 2013 +0200
batman-adv: send GW_DEL event when the gw client mode is deselected
Whenever the GW client mode is deselected, a DEL event has to be sent in order to tell userspace that the current gateway has been lost. Send the uevent on state change only if a gateway was currently selected.
Reported-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 1dbfe42c27cc0ac725ee81df53749b88d2b80520 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Jul 20 22:16:35 2013 +0200
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit b6afebbb23f888b2275f21d3b72a37b003fc77f8 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Jul 20 22:16:02 2013 +0200
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 31b3725831a19fb66b510659abdc2b3da8dd1676 Author: Antonio Quartulli antonio@open-mesh.com Date: Wed Jul 10 16:52:04 2013 +0200
batman-adv: remove bogus comment
this comment refers to the old batmand codebase and does not make sense anymore. Remove it
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 41b728cf4380e6560cf8dd3bb3a194955dcf5aa9 Author: Antonio Quartulli antonio@open-mesh.com Date: Sun Jul 7 09:19:56 2013 +0200
batman-adv: fix argument alignment
Introduced by e4ff5c153dab054a6cd1c4132f87bc5e77127456 ("batman-adv: add sysfs framework for VLAN")
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit bdc6c08f1d228511bff8b741ce03dcfb6f960079 Author: Antonio Quartulli antonio@open-mesh.com Date: Fri Jul 5 15:00:31 2013 +0200
batman-adv: properly start kernel doc
Introduced by 952cebb57518ec18dfdebfcb2b85539f58f20779 ("batman-adv: add per VLAN interface attribute framework")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 6f27447cbd4925a5fa42f17fd94f51574579f7a8 Author: Antonio Quartulli antonio@open-mesh.com Date: Thu Jul 4 17:54:51 2013 +0200
batman-adv: fix vlan compat code
A define has been accidentally put inside a wrong ifdef block. Move it out.
Introduced by 952cebb57518ec18dfdebfcb2b85539f58f20779 ("batman-adv: add per VLAN interface attribute framework")
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit ab91f68e386bd750eedf8ffd445bae1e5b3111d4 Author: Linus Lüssing linus.luessing@web.de Date: Wed Jul 3 10:40:00 2013 +0200
batman-adv: refine API calls for unicast transmissions of SKBs
With this patch the functions batadv_send_skb_unicast() and batadv_send_skb_unicast_4addr() are further refined into batadv_send_skb_via_tt(), batadv_send_skb_via_tt_4addr() and batadv_send_skb_via_gw(). This way we avoid any "guessing" about where to send a packet in the unicast forwarding methods and let the callers decide.
This is going to be useful for the upcoming multicast related patches in particular.
Further, the return values were polished a little to use the more appropriate NET_XMIT_* defines.
Signed-off-by: Linus Lüssing linus.luessing@web.de Acked-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit b8160b9bc8d515189c8d064e07ba5ea0bd842eab Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Jul 2 11:04:36 2013 +0200
batman-adv: make the AP isolation attribute VLAN specific
AP isolation has to be enabled on one VLAN interface only. This patch moves the AP isolation attribute to the per-vlan interface attribute set, enabling it to have a different value depending on the selected vlan.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit e4ff5c153dab054a6cd1c4132f87bc5e77127456 Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Jul 2 11:04:35 2013 +0200
batman-adv: add sysfs framework for VLAN
Each VLAN can now have its own set of attributes which are exported through a new subfolder in the sysfs tree. Each VLAN created on top of a soft_iface will have its own subfolder.
The subfolder is named "vlan%VID" and it is created inside the "mesh" sysfs folder belonging to batman-adv.
Attributes corresponding to the untagged LAN are stored in the root sysfs folder as before.
This patch also creates all the needed macros and data structures to easily handle new VLAN spacific attributes.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 952cebb57518ec18dfdebfcb2b85539f58f20779 Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Jul 2 11:04:34 2013 +0200
batman-adv: add per VLAN interface attribute framework
Since batman-adv is now fully VLAN-aware, a proper framework able to handle per-vlan-interface attributes is needed.
Those attributes will affect the associated VLAN interface only, rather than the real soft_iface (which would result in every vlan interface having the same attribute configuration).
To make the code simpler and easier to extend, attributes associated to the standalone soft_iface are now treated like belonging to yet another vlan having a special vid. This vid is different from the others because it is made up by all zeros and the VLAN_HAS_TAG bit is not set.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit cc14598eabfbe26e2cb62a435da786e5c6f5fd4b Author: Linus Lüssing linus.luessing@web.de Date: Fri Jun 14 20:04:09 2013 +0200
batman-adv: (style) fix for switched vid-ifiindex parameter order
batadv_tt_local_add() first takes the vid and then the interface index parameter. One of these calls had the order switched.
However in this case it is not a functional, but just a style fix because at the moment BATADV_NO_FLAGS is equal to BATADV_NULL_IFINDEX.
Introduced by 580d7919f19e4f73ccd79e82a532af2bdc638042 ("batman-adv: add the VLAN ID attribute to the TT entry")
Acked-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3e26722bc9f248ec4316749fc1957365c0fa5e4b Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Jun 4 12:11:43 2013 +0200
batman-adv: make the Distributed ARP Table vlan aware
The same IP subnet can be used on different VLANs, therefore DAT has to differentiate whether the IP to resolve belongs to one or the other virtual LAN. To accomplish this task DAT has to deal with the VLAN tag and store it together with each ARP entry.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9a40777e03bb2710a4f716867b2153257098972f Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Jun 4 12:11:42 2013 +0200
batman-adv: make the GW module correctly talk to the new VLAN-TT
The gateway code is now adapted in order to correctly interact with the Translation Table component by using the vlan ID
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 8fc2466a504ac7ff2371684b792f93bf5e4ec80f Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Jun 4 12:11:41 2013 +0200
batman-adv: print the VID together with the TT entries
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 4af2a1b2bf1354aa8b3683c9ac6a475d5a8f21ee Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Jun 4 12:11:40 2013 +0200
batman-adv: use vid when computing local and global TT CRC
now that each TT entry is characterised by a VLAN ID, the latter has to be taken into consideration when computing the local/global table CRC as it would be theoretically possible to have the same client in two different VLANs
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 580d7919f19e4f73ccd79e82a532af2bdc638042 Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Jun 4 12:11:39 2013 +0200
batman-adv: add the VLAN ID attribute to the TT entry
To make the translation table code VLAN-aware, each entry must carry the VLAN ID which it belongs to. This patch adds such attribute to the related TT structures.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3b38a80cd01a54c654ae589a4bbbf28f74503492 Merge: 1cfaca7 3b378ce Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Jun 9 12:34:49 2013 +0800
Merge branch 'next'
commit 3b378ce50fa393759396f5f16ca0bca612cc903e Merge: 052104b 3d999e5 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Jun 9 12:30:10 2013 +0800
Merge branch 'maint' into next
Conflicts: bat_iv_ogm.c
commit 3d999e5116f44b47c742aa16d6382721c360a6d0 Author: Simon Wunderlich simon@open-mesh.com Date: Thu May 23 13:07:42 2013 +0200
batman-adv: forward late OGMs from best next hop
When a packet is received from another node first and later from the best next hop, this packet is dropped. However the first OGM was sent with the BATADV_NOT_BEST_NEXT_HOP flag and thus dropped by neighbors. The late OGM from the best neighbor is then dropped because it is a duplicate.
If this situation happens constantly, a node might end up not forwarding the "valid" OGMs anymore, and nodes behind will starve from not getting valid OGMs.
Fix this by refining the duplicate checking behaviour: The actions should depend on whether it was a duplicate for a neighbor only or for the originator. OGMs which are not duplicates for a specific neighbor will now be considered in batadv_iv_ogm_forward(), but only actually forwarded for the best next hop. Therefore, late OGMs from the best next hop are forwarded now and not dropped as duplicates anymore.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 1cfaca7eb041c8b97f655ff7c44e3a00ac7c2400 Author: Linus Lüssing linus.luessing@web.de Date: Sun May 26 17:56:07 2013 +0200
batman-adv: Add dummy soft-interface rx mode handler
We do not actually need to set any rx filters for the virtual batman soft interface. However a dummy handler enables a user to set static multicast listeners for instance.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 2ff633f6ab100f5be057bc78bab07579cb7935c2 Merge: 9b5fcdc 052104b Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Jun 9 12:03:35 2013 +0800
Merge branch 'next'
commit 052104be20b022296bb91c533c6a3c1032eacb48 Merge: 33da4be 518fba1 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Jun 9 12:02:30 2013 +0800
Merge branch 'maint' into next
commit 518fba156ed911c6183cf5cb34955a6fdf1b4637 Author: Simon Wunderlich simon@open-mesh.com Date: Fri Jun 7 16:52:05 2013 +0200
batman-adv: Don't handle address updates when bla is disabled
The bridge loop avoidance has a hook to handle address updates of the originator. These should not be handled when bridge loop avoidance is disabled - it might send some bridge loop avoidance packets which should not appear if bla is disabled.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9b5fcdc10f09c6920fef574db59483a27b827b62 Author: Antonio Quartulli antonio@open-mesh.com Date: Tue May 28 13:14:28 2013 +0200
batman-adv: make batadv_tt_save_orig_buffer() generic
This is a simple batadv_tt_save_orig_buffer() refactoring aiming to make it more generic and avoid useless casts.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit f3ec6b31c6a515712500836223e1738f0bdfc885 Author: Antonio Quartulli antonio@open-mesh.com Date: Tue May 28 13:14:27 2013 +0200
batman-adv: implement batadv_tt_entries
Implement batadv_tt_entries() to get the number of entries fitting in a given amount of bytes. This computation is done several times in the code and therefore it is useful to have an helper function.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 0b415bb4dfe2351526ec7de5558a5fcce47642d4 Author: Martin Hundebøll martin@hundeboll.net Date: Tue May 28 08:23:22 2013 +0200
batman-adv: fix possible memleak in fragmentation
Use a variable for return value in batadv_frag_insert_packet() to free the allocated struct batadv_frag_list_entry in all cases where it is not inserted into a chain.
Introduced by 9b3eab61754d74a93c9840c296013fe3b4a1b606 ("batman-adv: Receive fragmented packets and merge")
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 87d4a2829d870da1de17e66fbf792f767ed796c8 Author: Simon Wunderlich simon@open-mesh.com Date: Tue May 28 11:49:47 2013 +0200
batman-adv: remove useless find_router look up
This is not used anymore with the new fragmentation, and it might actually mess up the bonding code because find_router() assumes it is only called once per packet.
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 0b0ef5bb4e18a819f7c8b1b53215fad5a223df33 Merge: 288a0ef 33da4be Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Jun 4 17:18:06 2013 +0800
Merge branch 'next'
commit 33da4be3846cbc5971907f655075e9e7a2132d6b Merge: 92bc8cd 96cd772 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Jun 4 17:16:29 2013 +0800
Merge branch 'maint' into next
commit 96cd7725540f4dccdd6fbb4fde59243e1cc1ad80 Author: Matthias Schiffer mschiffer@universe-factory.net Date: Tue May 28 17:32:32 2013 +0200
batman-adv: wait for rtnl in batadv_store_mesh_iface instead of failing if it is taken
The rtnl_lock in batadv_store_mesh_iface has been converted to a rtnl_trylock some time ago to avoid a possible deadlock between rtnl and s_active on removal of the sysfs nodes.
The behaviour introduced by that was quite confusing as it could lead to the sysfs store to fail, making batman-adv setup scripts unreliable. As recently the sysfs removal was postponed to a worker not running with the rtnl taken, the deadlock can't occur any more and it is safe to change the trylock back to a lock to make the sysfs store reliable again.
Signed-off-by: Matthias Schiffer mschiffer@universe-factory.net Reviewed-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 288a0ef623122b4746cc45c7927a846353c2f655 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu May 30 14:37:10 2013 +0800
batman-adv: remove obsolete variable
Introduced by 1ab746a3f2441d3466592b86134fbc72a9fe0558 ("batman-adv: properly align tvlv infrastructure")
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 617980aeed96e335eba2dac565bb10ced6437a05 Merge: 422ec22 92bc8cd Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Jun 4 17:06:32 2013 +0800
Merge branch 'next'
commit 92bc8cd2f254d1064f46151f77169c9aeda2791f Author: Jiri Pirko jiri@resnulli.us Date: Mon Jun 3 11:48:50 2013 +0200
net: pass info struct via netdevice notifier
So far, only net_device * could be passed along with netdevice notifier event. This patch provides a possibility to pass custom structure able to provide info that event listener needs to know.
Signed-off-by: Jiri Pirko jiri@resnulli.us
v2->v3: fix typo on simeth shortened dev_getter shortened notifier_info struct name v1->v2: fix notifier_call parameter in call_netdevice_notifier() Signed-off-by: David S. Miller davem@davemloft.net [ordex@autistici.org: added compat code] Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 422ec22d69ce6bddc6f61ef39fad4df990c48409 Author: Antonio Quartulli ordex@autistici.org Date: Tue May 28 14:06:06 2013 +0200
batman-adv: fix network order complaints in the TVLV code
Intorduced by 1ab746a3f2441d3466592b86134fbc72a9fe0558 ("batman-adv: properly align tvlv infrastructure")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit ce223eebdbb456784e5f95eb80583e22833e1ef2 Author: Antonio Quartulli ordex@autistici.org Date: Wed May 29 02:33:18 2013 +0200
batman-adv: fix merge conflict
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit f1f310d5c261f0214f85afea95d5cd11d49d64c6 Author: Marek Lindner lindner_marek@yahoo.de Date: Wed May 8 13:31:59 2013 +0800
batman-adv: consider network coding overhead when calculating required mtu
The module prints a warning when the MTU on the hard interface is too small to transfer payload traffic without fragmentation. The required MTU is calculated based on the encapsulation header size. If network coding is compild into the module its header size is taken into account as well.
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3b0654e3a586d359b3b58e621eaae10f2a52e162 Author: Antonio Quartulli ordex@autistici.org Date: Fri May 24 17:25:29 2013 +0200
batman-adv: fix typo in kernel doc
Now TT uses CRC32 instead of CRC16
Introduced by c5e7a06a29612056006e4dc01910c0b44e858583 ("batman-adv: use CRC32C instead of CRC16 in TT code")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 49d9c47affafe2ee395498c82b038df2ee9b1222 Author: Antonio Quartulli ordex@autistici.org Date: Fri May 24 17:25:28 2013 +0200
batman-adv: fix num_changes type to uint16_t
Since the introduction of the tvlv_tt_data struct variables storing the number of TT changes are always declared as uint16_t, however some of them were not changed.
Switch them al to uint16_t.
Introduced by 8405301b979466610a726b7d595b6bfee5306cf7 ("batman-adv: tvlv - convert tt data sent within OGMs")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 05a7111852ae77cb489808831ddacd6174800ea7 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun May 26 06:15:21 2013 +0800
batman-adv: properly align roaming tvlv container
4bytes long members must start at an address multiple of 4 in order to avoid unaligned memory access.
Introduced by 3de4e64df0f1326db7cc0ef25f5af8522850252d "batman-adv: tvlv - convert roaming adv packet to use tvlv unicast packets"
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 1ab746a3f2441d3466592b86134fbc72a9fe0558 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun May 26 06:15:20 2013 +0800
batman-adv: properly align tvlv infrastructure
4bytes long members must start at an address multiple of 4 in order to avoid unaligned memory access.
Therefore, the tvlv short type is eliminated in favor of tvlv long and that distinction removed from the code.
Introduced by 0b6aa0d43767889eeda43a132cf5e73df4e63bf2 "batman-adv: tvlv - basic infrastructure"
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 2fb072a9111aa9320f7a459c22ed00778eec7e6a Author: Antonio Quartulli ordex@autistici.org Date: Fri May 24 15:04:44 2013 +0200
batman-adv: correctly align the tt_tvlv_data struct
4bytes long members must start at an address multiple of 4 in order to avoid unaligned memory access.
Add 2 padding bytes to satisfy this requirement.
Introduced by c5e7a06a29612056006e4dc01910c0b44e858583 "batman-adv: use CRC32C instead of CRC16 in TT code"
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit eddf5862a45e5ab6b908f5b03ba995faaa4ae8de Author: Antonio Quartulli antonio@open-mesh.com Date: Fri May 24 11:21:25 2013 +0200
batman-adv: fix typo in kernel doc
Introduced by 8405301b979466610a726b7d595b6bfee5306cf7 ("batman-adv: tvlv - convert tt data sent within OGMs")
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 1897ab719862eb43e0a6edd3a20b8d9fa7a2173d Author: Antonio Quartulli antonio@open-mesh.com Date: Sat May 18 14:56:57 2013 +0200
batman-adv: create common header for ICMP packets
the icmp and the icmp_rr packets share the same initial fields since they use the same code to be processed and forwarded.
Extract the common fields and put them into a separate struct so that future ICMP packets can be easily added without bloating the packet definition.
However, keep the seqno field outside of the newly created common header because future ICMP types may require a bigger sequence number space.
This change breaks compatibility due to fields reordering in the ICMP headers.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 4a4f6b9ff2b55bdc885fb1486b9cfa726ea14277 Author: Antonio Quartulli ordex@autistici.org Date: Sun May 19 12:55:16 2013 +0200
batman-adv: use htons when possible
When comparing a network ordered value with a constant, it is better to convert the constant at compile time by means of htons() instead of converting the value at runtime using ntohs().
This refactoring may slightly improve the code performance.
Moreover substitute __constant_htons() with htons() since the latter increase readability and it is smart enough to be as efficient as the former
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit db56e4ecf5c2b179a0101138eacc2ec52b6ef45d Author: Martin Hundebøll martin@hundeboll.net Date: Thu May 23 16:53:03 2013 +0200
batman-adv: Fragment and send skbs larger than mtu
Non-broadcast packets larger than MTU are fragmented and sent with an encapsulating header. Up to 16 fragments are supported, which are sent in reverse order on the wire to allow minimal memory copying when creating fragments.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9b3eab61754d74a93c9840c296013fe3b4a1b606 Author: Martin Hundebøll martin@hundeboll.net Date: Thu May 23 16:53:02 2013 +0200
batman-adv: Receive fragmented packets and merge
Fragments arriving at their destination are buffered for later merge. Merged packets are passed to the main receive function as had they never been fragmented.
Fragments are forwarded without merging if the MTU of the outgoing interface is smaller than the size of the merged packet.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 8980aadd6132b3623c29e0a691541fc4899e2004 Author: Martin Hundebøll martin@hundeboll.net Date: Thu May 23 16:53:01 2013 +0200
batman-adv: Remove old fragmentation code
Remove the existing fragmentation code before adding the new version and delete unicast.{h,c}.
batadv_unicast_send_skb() is moved to send.c and renamed to batadv_send_skb_unicast().
fragmentation entry in sysfs (bat_priv->fragmentation) is kept for use in the new fragmentation code.
BATADV_UNICAST_FRAG packet type is renamed to BATADV_FRAG for use in the new fragmentation code.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit a5d79639a76d7a71116abbc369a246bd1fcbf947 Author: Martin Hundebøll martin@hundeboll.net Date: Wed Apr 17 21:13:16 2013 +0200
batman-adv: Avoid double freeing of bat_counters
On errors in batadv_mesh_init(), bat_counters will be freed in both batadv_mesh_free() and batadv_softif_init_late(). This patch fixes this by returning earlier from batadv_softif_init_late() in case of errors in batadv_mesh_init() and by setting bat_counters to NULL after freeing.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 925be3ea3615400ebd79c3a4a269b02dd4894272 Author: Antonio Quartulli ordex@autistici.org Date: Sun May 12 21:57:09 2013 +0200
batman-adv: use VLAN_ETH_HLEN instead of sizeof(struct vlan_eth_hdr)
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9eff62fcef81f356c63b47fcbe16465a562da684 Author: Antonio Quartulli ordex@autistici.org Date: Sun May 12 21:51:15 2013 +0200
batman-adv: h_vlan_encapsulated_proto access refactoring
In case of a VLAN tagged frame the ethhdr pointer is moved forward by 4 bytes so that the offset of h_proto in struct ethhdr matches the real h_vlan_encapsulated_proto address in the skb. While this trickery is correct it makes the code harder to understand and may lead to bugs in case of re-use of ethhdr for other purposes.
This patch introduces a proto variable to make things cleaner and easier to understand.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit b38fb61b7663f59cbc0003f15372cbbe67289f03 Merge: 99f6df1 64fc7ed Author: Antonio Quartulli ordex@autistici.org Date: Fri May 17 09:10:14 2013 +0200
Merge remote-tracking branch 'pkg/next' into merge/master
Conflicts: net/batman-adv/bridge_loop_avoidance.c net/batman-adv/compat.h
commit 99f6df123026c77e416fdec60aadbdc28375c0e7 Merge: 048202d f722406 Author: Antonio Quartulli ordex@autistici.org Date: Fri May 17 09:05:07 2013 +0200
Merge commit 'f722406faae2d073cc1d01063d1123c35425939e' into merge/master
(Linux v3.10-rc1 - tag did not exist in net-next)
Conflicts: net/batman-adv/bridge_loop_avoidance.c net/batman-adv/main.h net/batman-adv/network-coding.c net/batman-adv/network-coding.h net/batman-adv/routing.c net/batman-adv/soft-interface.c
commit e142720b1f46083ec4e3e6dada6ae0d05cd0144e Author: Antonio Quartulli ordex@autistici.org Date: Wed May 15 09:34:48 2013 +0200
batman-adv: add declaration in compat code
Add missing declaration in compat.h.
Introduced by 1bd816198771e2cbd44948a12aaca3ac33993d9d "batman-adv: don't use call_rcu if not needed"
Reported-by: Daily build check postmaster@open-mesh.org Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 1bd816198771e2cbd44948a12aaca3ac33993d9d Author: Antonio Quartulli ordex@autistici.org Date: Tue May 7 00:29:22 2013 +0200
batman-adv: don't use call_rcu if not needed
batadv_tt_global_entry_free_ref uses call_rcu to schedule a function which will only free the global entry itself.
For this reason call_rcu is useless and kfree_rcu can be used to simplify the code.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 8c77610f60b6071849d7a3555989e47fdf5da71d Merge: 4b1dc4a 64fc7ed Author: Marek Lindner lindner_marek@yahoo.de Date: Sun May 12 14:48:29 2013 +0800
Merge branch 'next'
commit 64fc7ed63afc8b16a5ca3a453c268eeaca3de137 Author: Antonio Quartulli ordex@autistici.org Date: Thu May 9 18:48:17 2013 +0200
batman-adv: use VLAN_VID_MASK instead of BATADV_VID_MASK
VLAN_VID_MASK is already diefined in linux/if_vlan.h and therefore does not need to be privately re-defined
Introduced in 0b1da1765fdb00ca5d53bc95c9abc70dfc9aae5b ("batman-adv: change VID semantic in the BLA code")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 78c836cfa6cfb44885118dc4310456ffdd87f915 Author: Antonio Quartulli ordex@autistici.org Date: Thu May 9 18:48:16 2013 +0200
batman-adv: use VLAN_VID_MASK when printing the vid
Introduced in 454b849c7de18a7b44eecebe889f5f3149d24780 ("batman-adv: print the VID properly")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 4b1dc4a8ae6c0e0792324cee5cf62f8056d2a031 Merge: bf140c3 675a590 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu May 9 17:43:27 2013 +0800
Merge branch 'next'
commit 675a59017340769c140e06e11ed2bd23d27b238e Merge: 3269ba9 763f413 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu May 9 17:32:06 2013 +0800
Merge branch 'maint' into next
commit 763f413b9c74ccb25cb066408f49f07e5dd78f9b Author: Antonio Quartulli ordex@autistici.org Date: Tue May 7 01:06:18 2013 +0200
batman-adv: reorder clean up routine in order to avoid race conditions
nc_worker accesses the originator table during its periodic work, but since the originator table is freed before stopping the worker this leads to a global protection fault.
Fix this by killing the worker (in nc_free) before freeing the originator table.
Moreover tidy up the entire clean up routine by running all the subcomponents freeing procedures first and then killing the TT and the originator tables at the end.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit bf140c39fa3890e167e024082e897ac3fe38f29b Merge: 469d4b4 3269ba9 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu May 9 17:02:32 2013 +0800
Merge branch 'next'
commit 3269ba99e75101104bddc3200fec33a3c1011748 Merge: 4e564b0 d6bd8b3 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu May 9 17:01:39 2013 +0800
Merge branch 'maint' into next
commit d6bd8b36fa1f3d72a6fd5942a6e9bde6ddafcd0d Author: Antonio Quartulli ordex@autistici.org Date: Thu May 9 09:35:45 2013 +0200
batman-adv: make DAT drop ARP requests targeting local clients
In the outgoing ARP request snooping routine in DAT, ARP Request sent by local clients which are supposed to be replied by other local clients can be silently dropped.
The destination host will reply by itself through the LAN and therefore there is no need to involve DAT.
Reported-by: Carlos Quijano carlos@crqgestion.es Signed-off-by: Antonio Quartulli ordex@autistici.org Tested-by: Carlos Quijano carlos@crqgestion.es Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit d22ebef1431aab13099370b89afa4ba55eb95c35 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue May 7 19:25:02 2013 +0800
batman-adv: check return value of pskb_trim_rcsum()
Reported-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Martin Hundebøll martin@hundeboll.net
commit 469d4b406edd7b33fb88faaee95a1c81660a4092 Author: Antonio Quartulli ordex@autistici.org Date: Sun May 5 14:37:56 2013 +0200
batman-adv: remove batadv_tt_global_add_orig declaration
batadv_tt_global_add_orig is neither used nor implemented anymore, therefore it is possible to remove its declaration
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit be7e115f2ffcf0a6bcffeba7479c39087cacf6f3 Author: Antonio Quartulli ordex@autistici.org Date: Sun May 5 19:32:38 2013 +0200
batman-adv: make tt_global_add static and return bool
batadv_tt_global_add is not used anymore outside of the TT code thanks to the TVLV implementation. It can therefore be declared as static
Last user has been removed by 3de4e64df0f1326db7cc0ef25f5af8522850252d ("batman-adv: tvlv - convert roaming adv packet to use tvlv unicast packets")
Moreover make it return bool since its result can be either 0 or 1.
Reported-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 494fa44be155dd5142b638b938590c41170a3e5c Author: Antonio Quartulli ordex@autistici.org Date: Sun Apr 28 12:00:29 2013 +0200
batman-adv: remove white spaces at the beginning of the lines
Intiroduced by: 3bcf1e15714b78e8581ccbf4724cda9e20ac4aa4 ("batman-adv: reorder packet types")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit c1d1c63831a4fe140a8005491c5ea008a0f31c7b Merge: b6acece 4e564b0 Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Apr 29 15:11:43 2013 +0800
Merge branch 'next'
commit 4e564b058aa75e73cc6eb117e60bd85ea813c568 Author: Antonio Quartulli ordex@autistici.org Date: Sun Apr 28 11:58:03 2013 +0200
batman-adv: remove white spaces in indentation
Introduced during the merge of maint into next
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit b6acece9326829aa05082f3675acdf2251a814f5 Author: Antonio Quartulli ordex@autistici.org Date: Sun Apr 28 10:09:26 2013 +0200
batman-adv: use the BigEndian notation for variables sent over the wire
All the variables sent over the wire must report the BigEndian (__be*) notation so that sparse can easily spot any bug due to missing conversions.
This patch changes the type used by the up and download bandwidth in the new GW TVLV from uint32_t to __be32 and adds all the related conversions.
Introduced by: 0853ec7fafe0a195754454832993c6b35e22b842 ("batman-adv: tvlv - gateway download/upload bandwidth container")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 957f64752819e0fec716ba8399676f9a7224762d Merge: 208b49c d544c5e Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Apr 29 15:07:43 2013 +0800
Merge branch 'next'
commit d544c5e395cf544d4b29acb9393d309115bba806 Merge: 32cadb4 aa7d19a Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Apr 29 15:07:04 2013 +0800
Merge branch 'maint' into next
commit aa7d19a5b97fe48657e075e8e4d130bd6916551e Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Apr 27 16:22:28 2013 +0800
batman-adv: check proto length before accessing proto string buffer
batadv_param_set_ra() strips the trailing '\n' from the supplied string buffer without checking the length of the buffer first. This patches avoids random memory access and associated potential crashes.
Reported-by: Sasha Levin sasha.levin@oracle.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 32cadb4f1ba0dd9b08fe5dedf71c4420d939c370 Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Apr 27 16:22:28 2013 +0800
batman-adv: check proto length before accessing proto string buffer
batadv_param_set_ra() strips the trailing '\n' from the supplied string buffer without checking the length of the buffer first. This patches avoids random memory access and associated potential crashes.
Reported-by: Sasha Levin sasha.levin@oracle.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 208b49c44a7d60af796356aef7911dcec9122af3 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Thu Apr 25 10:37:26 2013 +0200
batman-adv: only add recordroute information to icmp request/reply
Adding host information for record route is only required for ICMP requests and replys, and should not be added to just any (future?) packet type.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 11bf50091dddbe4674e425c84b421fad1caa3df2 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Thu Apr 25 10:37:25 2013 +0200
batman-adv: reorder batadv_iv_flags
The vis flag is not needed anymore, and since we do a compat bump we can start with the first bit again
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 85cc6b9361fc988f4e3b9f103ba60ee23a93bbce Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Thu Apr 25 10:37:24 2013 +0200
batman-adv: remove packed from batadv_ogm_packet
As we decreased the struct size from 26 to 24 byte, we can remove __packed as the compiler will not add any more padding.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3bcf1e15714b78e8581ccbf4724cda9e20ac4aa4 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Thu Apr 25 10:37:23 2013 +0200
batman-adv: reorder packet types
Reordering the packet type numbers allows us to handle unicast packets in a general way - even if we don't know the specific packet type, we can still forward it. There was already code handling this for a couple of unicast packets, and this is the more generalized version to do that.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit a36f66e669ecfbb8f701d15ce317cdf2e39e092a Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Thu Apr 25 10:37:22 2013 +0200
batman-adv: add build check macros for packet member offset
Since we removed the __packed from most of the packets, we should make sure that the offset generated by the compiler are correct for sent/received data.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit ccdf02f09cd9440f1ede3771509cbf0dce32e860 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Thu Apr 25 11:57:42 2013 +0200
batman-adv: remove vis functionality
This is replaced by a userspace program, we don't need this functionality to bloat the kernel.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit bbc2d6d1603babb7f598eb7b3e9708777288b920 Author: Antonio Quartulli ordex@autistici.org Date: Wed Apr 24 16:37:52 2013 +0200
batman-adv: move BATADV_TT_CLIENT_TEMP to higher bit
Client flags from bit 0 to 7 are sent over the wire. BATADV_TT_CLIENT_TEMP is a local flag and is not supposed to be sent to the network. Therefore it has occupy a higher bit.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit c5e7a06a29612056006e4dc01910c0b44e858583 Author: Antonio Quartulli ordex@autistici.org Date: Wed Apr 24 16:37:51 2013 +0200
batman-adv: use CRC32C instead of CRC16 in TT code
CRC32C has to be preferred to CRC16 because of its possible HW native support and because of the reduced collision probability. With this change the Translation Table component now uses CRC32C to compute the local and global table checksum.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 987dc830a214bde34bba8511e60e95c89783119b Merge: 3de4e64 7996b58 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Apr 25 00:50:31 2013 +0800
Merge branch 'next'
commit 7996b589531b62189fea0a89e04165fc49042947 Merge: 675fbb4 82d1a8e Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Apr 25 00:49:20 2013 +0800
Merge branch 'maint' into next
Conflicts: bridge_loop_avoidance.c
commit 82d1a8ebf19a1b9841ee44ce7b2448114be3e772 Author: Patrick McHardy kaber@trash.net Date: Wed Apr 24 17:42:56 2013 +0200
net: vlan: add protocol argument to packet tagging functions
Add a protocol argument to the VLAN packet tagging functions. In case of HW tagging, we need that protocol available in the ndo_start_xmit functions, so it is stored in a new field in the skb. The new field fits into a hole (on 64 bit) and doesn't increase the sks's size.
Signed-off-by: Patrick McHardy kaber@trash.net Signed-off-by: David S. Miller davem@davemloft.net [siwu@hrz.tu-chemnitz.de: added compat code] Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3de4e64df0f1326db7cc0ef25f5af8522850252d Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Apr 23 21:40:03 2013 +0800
batman-adv: tvlv - convert roaming adv packet to use tvlv unicast packets
Instead of generating roaming specific packets the TVLV unicast API is used to send roaming information.
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 6228419df3a53d09a2ba1f3e7b32bcd7cd59c968 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Apr 23 21:40:02 2013 +0800
batman-adv: tvlv - convert tt query packet to use tvlv unicast packets
Instead of generating TT specific packets the TVLV unicast API is used to send translation table data.
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 8405301b979466610a726b7d595b6bfee5306cf7 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Apr 23 21:40:01 2013 +0800
batman-adv: tvlv - convert tt data sent within OGMs
The translation table meta data (version number, crc checksum, etc) as well as the translation table diff propgated within OGMs now uses the newly introduced tvlv infrastructure.
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 7dd9d8992b0c197ba656a6d9a70966cea10fc2d9 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Apr 23 21:40:00 2013 +0800
batman-adv: tvlv - add network coding container
Create network coding container to announce network coding capabilities (if enabled).
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 2b1c07b918d2acc41555bbde9d538179acb308b4 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Apr 23 21:39:59 2013 +0800
batman-adv: tvlv - add distributed arp table container
Create DAT container to announce DAT capabilities (if enabled).
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 0853ec7fafe0a195754454832993c6b35e22b842 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Apr 23 21:39:58 2013 +0800
batman-adv: tvlv - gateway download/upload bandwidth container
Prior to this patch batman-adv read the advertised uplink bandwidth from userspace and compressed this information into a single byte called "gateway class". Now the download & upload bandwidth information is sent as-is. No userspace change is necessary since the sysfs API always allowed to specify a bandwidth.
Signed-off-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Spyros Gasteratos morfeas3000@gmail.com
commit 0b6aa0d43767889eeda43a132cf5e73df4e63bf2 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Apr 23 21:39:57 2013 +0800
batman-adv: tvlv - basic infrastructure
The goal is to provide the infrastructure for sending, receiving and parsing information 'containers' while preserving backward compatibility. TVLV (based on the commonly known Type Length Value technique) was chosen as the format for those containers. Even if a node does not know the tvlv type of a certain container it can simply skip the current container and proceed with the next. Past experience has shown features evolve over time, so a 'version' field was added right from the start to allow differentiating between feature variants - hence the name: T(ype) V(ersion) L(ength) V(alue).
This patch introduces the basic TVLV infrastructure: * register / unregister tvlv containers to be sent with each OGM (on primary interfaces only) * register / unregister callback handlers to be called upon finding the corresponding tvlv type in a tvlv buffer * unicast tvlv send / receive API calls
Signed-off-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Spyros Gasteratos morfeas3000@gmail.com
commit 048202d71c245271fe758755504ff875f547446f Merge: 34dbd45 675fbb4 Author: Antonio Quartulli ordex@autistici.org Date: Sun Apr 21 12:51:37 2013 +0200
Merge remote-tracking branch 'pkg/next' into merge/master
Conflicts: net/batman-adv/CHANGELOG net/batman-adv/Makefile.kbuild net/batman-adv/README.external net/batman-adv/compat.h
commit 8a0b4eb1079d1585d8d41e3d810258ca0c55d25a Author: Antonio Quartulli ordex@autistici.org Date: Sat Apr 20 15:59:13 2013 +0200
batman-adv: switch to a new packet compatibility version
With this change batman-adv is breaking compatibility with older versions and it is moving to compat-version 15.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 675fbb48d3b588caeee16d2e76b774b186e11f14 Merge: d5e4a47 9b96ecb Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Apr 20 23:51:02 2013 +0800
Merge branch 'maint' into next
commit 9b96ecbae7295269aaa0320667f646870de65661 Author: Antonio Quartulli antonio@open-mesh.com Date: Wed Apr 3 10:14:20 2013 +0200
batman-adv: use the proper header len when checking the TTVN
Unicast packet might be of type either UNICAST or UNICAST4ADDR. In the two cases the header size is different, but the mechanism checking the TTVN field was assuming it to be always of the same type (UNICAST), so failing to access the inner Ethernet header in case of UNICAST4ADDR.
Fix this by passing the real header length as argument.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit d5e4a47b88b5e900708763b9eb0101c54b0a707c Merge: ae72fda4 49f0f59 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Apr 20 17:39:01 2013 +0200
Merge remote-tracking branch 'origin/next'
commit 49f0f595baaf5eba72fca5c6c4454566eee21ea9 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Apr 20 17:15:09 2013 +0200
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit b284ca84e2c3afc5d5c82a7e9feed14821c4cdc5 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Apr 20 17:00:38 2013 +0200
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 6867988962eef3c1a7517f39d0d12b40c312f319 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Apr 20 16:52:12 2013 +0200
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit ae72fda403e522da85d78385ec1e2241be6acc78 Author: Martin Hundebøll martin@hundeboll.net Date: Sat Apr 20 13:54:39 2013 +0200
batman-adv: Move call to batadv_nc_skb_forward() from routing.c to send.c
The call to batadv_nc_skb_forward() fits better in batadv_send_skb_to_orig(), as this is where the actual next hop is looked up.
To let the caller of batadv_send_skb_to_orig() know wether the skb is transmitted, buffered or failed, the return value is changed from boolean to int.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 454b849c7de18a7b44eecebe889f5f3149d24780 Author: Antonio Quartulli antonio@open-mesh.com Date: Fri Apr 19 18:07:01 2013 +0200
batman-adv: print the VID properly
Since the MSB bits of any vid variable are now used for storing flags, print the vid properly by taking the flags away and printing -1 in case of VID representing no real VLAN.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 0b1da1765fdb00ca5d53bc95c9abc70dfc9aae5b Author: Antonio Quartulli antonio@open-mesh.com Date: Fri Apr 19 18:07:00 2013 +0200
batman-adv: change VID semantic in the BLA code
In order to make batman-adv fully vlan aware later, the semantic used for variables storing the VLAN ID values has to be changed in order to be adapted to the new one which will be used batman-adv wide.
In particular, the VID has to be an "_unsigned_ short int" and its 4 MSB will be used as a flag bitfield, while the remaining 12 bits are used to store the real VID value
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 7b6b29ff35458c2bda9a0055f8535a2246296ccd Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Apr 18 04:56:03 2013 +0800
batman-adv: do not print orig nodes without nc neighbors on nc table print
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 68a3373e1b14bfc3ad3bd66e9778dc67dad8365d Author: Linus Lüssing linus.luessing@web.de Date: Fri Apr 19 12:06:56 2013 +0200
batman-adv: Remove unnecessary INIT_HLIST_NODE() calls
There's no need to for an explicit hlist_node initialization if it is added to a list right away, like it's the case with the hlist_add_head()s here.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 0ff0af1165f9d2156805a4a16202ab7e0c830b81 Author: Antonio Quartulli ordex@autistici.org Date: Thu Apr 18 15:13:01 2013 +0200
batman-adv: pass a 16bit long flag argument to tt_global_add()
it may be the case that we want to store some local TT client flags in a global entry, therefore the tt_global_add needs to get a proper argument for this
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9d48211dc27a2cb32067211ab5f8991c598a52f6 Merge: 1cacf96 7e0135e Author: Marek Lindner lindner_marek@yahoo.de Date: Fri Apr 19 17:59:38 2013 +0800
Merge branch 'next'
commit 7e0135ef9d3e59beb4dbd3a0188398f562bcfa63 Author: Antonio Quartulli ordex@autistici.org Date: Fri Apr 19 10:56:25 2013 +0200
batman-adv: remove useless newline
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 1cacf964e55b0fcd4f5f4de857ca0881b21a5133 Author: Antonio Quartulli ordex@autistici.org Date: Tue Apr 2 22:28:44 2013 +0200
batman-adv: don't deal with NET_IP_ALIGN manually
Instead of dealing with NET_IP_ALIGN during allocation and headroom reservation, it is possible to use netdev_alloc_skb_ip_align() which transparently allocate and reserve the correct amount of data
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 34dbd45c064773e647bbbddd25597eb408f16fe5 Merge: 9090211 73eb82e Author: Antonio Quartulli ordex@autistici.org Date: Wed Apr 17 22:22:30 2013 +0200
Merge remote-tracking branch 'pkg/next' into merge/master
Conflicts: net/batman-adv/README.external
commit 6c2d441c0453ff594321f6c874de96e02b4949cd Merge: b10ac71 73eb82e Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Apr 18 03:56:27 2013 +0800
Merge branch 'next'
commit 73eb82ec1704bd7a6046a5493126fd0ad09c48a4 Author: Antonio Quartulli ordex@autistici.org Date: Wed Apr 17 21:45:43 2013 +0200
batman-adv: fix global protection fault during soft_iface destruction
batadv_mesh_free() schedules some RCU callbacks which need the bat_priv struct to do their jobs, while free_netdev(), which is called immediately after, is destroying the private data.
Put an rcu_barrier() in the middle so that free_netdev() is invoked only after all the callbacks returned.
This bug has been introduced by ab8f433dd39be94e8617cff2dfe9f7eca162eb15 ("batman-adv: Move deinitialization of soft-interface to destructor")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit b10ac7146da4d41bb9692f32bd35f31947984bf7 Author: Martin Hundebøll martin@hundeboll.net Date: Wed Apr 17 21:13:16 2013 +0200
batman-adv: Avoid double freeing of bat_counters
On errors in batadv_mesh_init(), bat_counters will be freed in both batadv_mesh_free() and batadv_softif_init_late(). This patch fixes this by returning earlier from batadv_softif_init_late() in case of errors in batadv_mesh_init() and by setting bat_counters to NULL after freeing.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 90725dde0fdb330848f4beca1dcb59a63bc6222c Author: Antonio Quartulli antonio@open-mesh.com Date: Wed Apr 3 11:15:33 2013 +0200
batman-adv: refactor batadv_tt_local_event()
Instead of passing a generic combination of flags as argument, it is easier to pass the entire tt_common structure (containing the flags already set) plus a bitfield of event flags that will be unified with the already existing ones before inserting the client in the event queue. In this way invocations of the modified function can be simplified.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 1ba02221962fa9fa1e9b32ed1e9ad01c3149c724 Author: Antonio Quartulli antonio@open-mesh.com Date: Wed Apr 17 17:44:43 2013 +0200
batman-adv: move batadv_slide_own_bcast_window to bat_iv_ogm.c
batadv_slide_own_bcast_window() is used only in bat_iv_ogm.c and it is currently touching only batman_iv specific attributes.
Move it into bat_iv_ogm.c and make it static.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3d1c46ea151185574935673859d0776bf38ab8fd Merge: 919495e 8746974 Author: Marek Lindner lindner_marek@yahoo.de Date: Wed Apr 17 00:35:51 2013 +0800
Merge branch 'next'
commit 87469742aef107004c5a20c16b70f8d53fd0a13f Author: Antonio Quartulli ordex@autistici.org Date: Tue Apr 16 18:17:36 2013 +0200
batman-adv: fix batadv_is_my_mac() usage
batadv_is_my_mac() has been changed in net and now code in net-next using it must be adapted. Some kernel doc has been added as well.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 919495e481cf988cbe674de8c7fc09834e07502e Merge: c941378 4669c9c Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Apr 16 22:09:08 2013 +0800
Merge branch 'next'
commit 4669c9cec49229d327f8c2535c2a8b36be358ab0 Merge: 0e59ab2 647d23f Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Apr 16 22:08:38 2013 +0800
Merge branch 'maint' into next
Conflicts: routing.c
commit 647d23f3e358d9fa4b1a8f0bb67a3e6bff30d4a1 Author: Antonio Quartulli ordex@autistici.org Date: Wed Apr 3 19:10:26 2013 +0200
batman-adv: make is_my_mac() check for the current mesh only
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
commit c941378b5fdb02827ba936235a5acc760a0a9d85 Author: Antonio Quartulli ordex@autistici.org Date: Mon Apr 8 09:38:12 2013 +0200
batman-adv: move ring_buffer helper functions in bat_iv_ogm
the two lonely ring_buffer helper functions are used by the bat_iv_ogm module only and therefore they can be moved inside it.
Reported-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 10154636fdefbf94b0a63220ace57c088a3ba947 Author: Antonio Quartulli ordex@autistici.org Date: Mon Apr 8 15:08:18 2013 +0200
batman-adv: use eth_hdr() when it makes sense
Instead of casting the result of skb_mac_header() to "struct ethhdr *" every time, the eth_hdr inline function can be use to beautify the code and improve its readability.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3d36bed459f83e142e7370a6000305e869ef97bd Merge: c8bda21 0e59ab2 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Apr 16 20:59:42 2013 +0800
Merge branch 'next'
commit 0e59ab2426724b59aa0d87f6a284e59dabff33fc Author: Martin Hundebøll martin@hundeboll.net Date: Tue Apr 16 12:59:04 2013 +0200
batman-adv: Add network coding option to external README
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit c8bda218468a803a9a3d76d291cf748db2945ce4 Author: Linus Lüssing linus.luessing@web.de Date: Mon Apr 15 21:43:29 2013 +0800
batman-adv: Fix rcu_barrier() miss due to double call_rcu() in TT code
rcu_barrier() only waits for the currently scheduled rcu functions to finish - it won't wait for any function scheduled via another call_rcu() within an rcu scheduled function.
Unfortunately our batadv_tt_orig_list_entry_free_ref() does just that, via a batadv_orig_node_free_ref() call, leading to our rcu_barrier() call potentially missing such a batadv_orig_node_free_ref().
This patch fixes this issue by calling the batadv_orig_node_free_rcu() directly from the rcu callback, removing the unnecessary, additional call_rcu() layer here.
Signed-off-by: Linus Lüssing linus.luessing@web.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Antonio Quartulli ordex@autistici.org
commit 1cc6cbc51cb985bd1e43aeeaff545b889b9742b1 Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Apr 2 12:16:53 2013 +0200
batman-adv: don't initialise batman_iv private members in hard-interface.c
hard-interface.c has to do not contain any routing algorithm specific code.
Allocate the hard-interface with kzalloc() and remove any useless and algorithm specific member initialisation
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit c969b9ef335252c7208057e12f6c8a8ea41da06f Author: Antonio Quartulli ordex@autistici.org Date: Sat Mar 30 17:22:00 2013 +0100
batman-adv: do not silently ignore wrong condition
Only one neigh_node per orig_node should match a given neighbor address, therefore, if more than one matching neigh_node is found, a WARNING has to be triggered to let the user know that something is wrong in the originator state instead of silently skipping the error.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit ae9218eabc56818906256c34379473f3e5ea8026 Author: Antonio Quartulli antonio@open-mesh.com Date: Thu Mar 28 14:21:12 2013 +0100
batman-adv: don't check compat version twice
Compatibility version is checked upon packet reception before calling any handler. For this reason it does need to be checked once more in the handler itself.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 0e7086c673cb7e383ccb70dd58e9091612780f11 Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Mar 25 22:27:00 2013 +0100
batman-adv: don't check the source address twice
The source address has already been checked in batadv_check_management_packet() upon packet reception and therefore it does not need to be checked again in ogm_process()
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit ca32543d6ad096dcc0ccb0379e2e80dc06bdf0ad Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Mar 25 13:54:45 2013 +0100
batman-adv: slightly improve neighbor creation debug message
print the interface along with the new neighbor mac address
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 30b57229f93da9f8b749d36ef6da4d007c3cc692 Author: Antonio Quartulli antonio@open-mesh.com Date: Mon Mar 25 13:49:46 2013 +0100
batman-adv: drop useless argument seqno in neighbor creation
the sequence number is not stored in struct neigh_node, therefore there is no need to pass such value to the neigh_node creation procedure.
At the moment the value is only used by a debug message, but given the fact that the seqno is not related to the neighbor object, it is better to print it elsewhere.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9090211776319028d1735e8a86727ac48ecf588e Merge: b906204 a1eecdd Author: Antonio Quartulli ordex@autistici.org Date: Wed Mar 27 09:54:39 2013 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
Signed-off-by: Antonio Quartulli ordex@autistici.org
Conflicts: net/batman-adv/compat.h
commit b3b036c5e081b4aa8c3cfb5e4cfb5541c21ed2b3 Merge: 2e4003c a1eecdd Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Mar 25 18:18:23 2013 +0800
Merge branch 'next'
commit a1eecddcb39f1a25506683d98ce349087b258ab4 Author: Antonio Quartulli ordex@autistici.org Date: Mon Mar 25 09:24:10 2013 +0100
batman-adv: fix interface clean up on error
When enabling an hard_iface for the first time, the hard_iface->soft_iface member is initialised with the newly created soft_iface. However, in case of error during the activation procedure this member has to be set to NULL again, otherwise the hard_iface will result busy and will not be possible to use it anymore
This issue has been introduced with edd08535c00a42143989118bc999060893ce0a41 ("batman-adv: Allow to modify slaves of soft-interfaces through rntl_link")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 174cf3a4fd171a80e9e12b163754ec05c607f73e Author: Antonio Quartulli ordex@autistici.org Date: Thu Mar 21 09:23:29 2013 +0100
batman-adv: use seq_puts instead of seq_printf when the format is constant
As reported by checkpatch, seq_puts has to be preferred with respect to seq_printf when the format is a constant string (no va_args)
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9e96c4d373e45322d98ca177f7c4cc0b97f282d5 Author: Antonio Quartulli ordex@autistici.org Date: Fri Mar 22 09:49:55 2013 +0100
batman-adv: fix old master freeing operation
When a new hard_iface has a master already, ndo_del_slave has to be used in order to let the old master perform its cleaning up routine correctly. Unsetting the master iface only can lead to a inconsistent state in the master driver.
Introduced by 5e57e3bff429cd403f0e30af69cf87a2cd55598f ("batman-adv: free an hard-interface before adding it").
Reported-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit b906204f0dfb5ff298d9499d8da3b26113eed90c Merge: 76b7062 d4e5e01 Author: Antonio Quartulli ordex@autistici.org Date: Mon Mar 18 13:43:34 2013 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
Signed-off-by: Antonio Quartulli ordex@autistici.org
Conflicts: net/batman-adv/compat.h
commit 2e4003cdd99588a61d02fa2bf4721c9bb29f2814 Merge: b459f99 d4e5e01 Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Mar 18 16:26:01 2013 +0800
Merge branch 'next'
commit d4e5e0143fe81cfe804e753f9d7cc3d9e6447e86 Author: Matthias Schiffer mschiffer@universe-factory.net Date: Sat Mar 16 12:30:10 2013 +0100
batman-adv: fix compat for Debian Wheezy kernel v3.2.39
Starting with kernel v3.2.39, a Debian specific patch defines eth_hw_addr_random() in include/linux/etherdevice.h, causing the build of batman-adv to fail.
This patch fixes the build on these kernels while keeping compatiblity with unpatched kernels by renaming batman-adv's compat definition of the eth_hw_addr_random() function to resolve the name conflict and adding a #define macro.
Signed-off-by: Matthias Schiffer mschiffer@universe-factory.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit b4dba4740fc561475051889470bfa4d671947ddb Author: Antonio Quartulli ordex@autistici.org Date: Sat Mar 16 11:57:42 2013 +0100
batman-adv: add RCU compat code for linux < 2.6.34
In linux version < 2.6.34 rcu_dereference_raw() does not exist and needs to be backported.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 80e3bf8ffad6114ae89d4551e46c8b5069def969 Author: Antonio Quartulli ordex@autistici.org Date: Sat Mar 16 12:49:18 2013 +0100
batman-adv: add RCU compat code for kernel < 2.6.37
In linux version < 2.6.37 hlist_first_rcu() and hlist_next_rcu() do not exist and therefore they need to be backported.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit b459f993359a4bb346ae279eac5f5f5f68a3cb35 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Mar 10 19:29:15 2013 +0800
batman-adv: fix typos in kernel doc & comments
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit cc1fde312b6d3c010784a80aff9e942e3b16d015 Author: Matthias Schiffer mschiffer@universe-factory.net Date: Sat Mar 9 23:14:23 2013 +0100
batman-adv: send each broadcast only once on non-wireless interfaces
While it makes sense to send each broadcast thrice on 802.11 (WLAN) interfaces as broadcasts are often unreliable on these, there is no reason to do so on other interface types.
The increased the overhead can be harmful on low-bandwidth links like VPN connections over slow internet lines, therefore it is better to reduce the number of broadcast packets sent on non-wireless links to one.
Signed-off-by: Matthias Schiffer mschiffer@universe-factory.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit a75dbf478b145d01b1d64ea9b4540741f64f577f Author: Matthias Schiffer mschiffer@universe-factory.net Date: Sat Mar 9 23:14:22 2013 +0100
batman-adv: split batadv_is_wifi_iface() into two functions
Previously batadv_is_wifi_iface() did two things at once: looking up a net_device from an interface index, and determining if it is a wifi device.
The second part is useful itself when the caller already has a net_device reference.
Signed-off-by: Matthias Schiffer mschiffer@universe-factory.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit a67d520ca944185dce51bfb27868ac83ecf67f95 Author: Martin Hundebøll martin@hundeboll.net Date: Thu Mar 14 21:30:21 2013 +0100
batman-adv: Fix endianness errors for network coding
Add a htonl() in network_coding.c when reading the sequence number from received ogm_packet, to avoid wrong byte ordering when comparing with a host value. This bug was introduced in 3ed7ada3f0bbcd058567bc0a8f9729a73eba7db6 ("batman-adv: network coding - detect coding nodes and remove these after timeout").
Change the type of coded_packet->coded_len from uint16 to __be16 to avoid wrong assumptions about endianness in later uses. Introduced in c3289f3650d34b60296000a629c99f2488f7c3dd ("batman-adv: network coding - code and transmit packets if possible").
Reported-by: Fengguang Wu fengguang.wu@intel.com Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 76b7062984256240ed73f97ef1b8fcc8dcd1c7a8 Author: Antonio Quartulli ordex@autistici.org Date: Wed Mar 13 21:39:06 2013 +0100
batman-adv: fix Makefile
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 7061bf6949daa70b66a4fd1c45f6a146156596bc Merge: 7b6f8f9 e15b737 Author: Antonio Quartulli ordex@autistici.org Date: Sun Mar 10 21:27:21 2013 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
Conflicts: net/batman-adv/compat.h
commit 7b6f8f94d1134e4aeae9fa1e9b429933cc5e2bb5 Author: Antonio Quartulli ordex@autistici.org Date: Sat Mar 9 22:38:41 2013 +0100
batman-adv: add network coding Kconfig option
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit e15b7378a55b8a068ac1c76cccfc32f112b0bdec Author: Antonio Quartulli ordex@autistici.org Date: Sun Mar 10 01:19:43 2013 +0100
batman-adv: correct super define in network coding header
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit cdc11ae60b904b2e3e14a5ad09a7cd110dd89708 Merge: 0ca83ef c506b11 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Mar 10 13:47:16 2013 +0800
Merge branch 'maint' into next
Conflicts: compat.h network-coding.c
commit c506b113c82319c43478ff31c933c4e98f0084d7 Author: Sasha Levin sasha.levin@oracle.com Date: Wed Feb 27 17:06:00 2013 -0800
hlist: drop the node parameter from iterators
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 Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 0ca83ef6c941fbb8132c29073b9ed16958f2b939 Merge: 1849135 e56c79f Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Mar 9 18:02:37 2013 +0800
Merge branch 'maint' into next
commit e56c79f4e863436d0fc6c48fed0db09b7a49e565 Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Mar 4 10:39:49 2013 +0800
batman-adv: verify tt len does not exceed packet len
batadv_iv_ogm_process() accesses the packet using the tt_num_changes attribute regardless of the real packet len (assuming the length check was done before). Therefore a length check is needed to avoid reading random memory.
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 1a95fced5523eb1f601d2df341259ba59c7074d0 Merge: 34d195c 1849135 Author: Antonio Quartulli ordex@autistici.org Date: Wed Mar 6 09:10:33 2013 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
Signed-off-by: Antonio Quartulli ordex@autistici.org
Conflicts: net/batman-adv/Makefile net/batman-adv/Makefile.kbuild net/batman-adv/compat.c net/batman-adv/compat.h net/batman-adv/gen-compat-autoconf.sh net/batman-adv/sysfs-class-net-mesh
commit 34d195c82ad86bccf772d26083155adbe5b6bd24 Merge: c1c28d6 6dbe51c Author: Antonio Quartulli ordex@autistici.org Date: Wed Mar 6 09:01:28 2013 +0100
Merge tag 'v3.9-rc1' into merge/master
Linux 3.9-rc1
Signed-off-by: Antonio Quartulli ordex@autistici.org
Conflicts: net/batman-adv/bridge_loop_avoidance.c net/batman-adv/originator.c net/batman-adv/vis.c
commit c1c28d6d8cf31666cea40dbf5ee5bf65c1f3c40a Merge: 58ad6a5 4230486 Author: Antonio Quartulli ordex@autistici.org Date: Mon Mar 4 09:23:09 2013 +0100
Merge remote-tracking branch 'pkg/maint' into merge/master
Signed-off-by: Antonio Quartulli ordex@autistici.org
Conflicts: net/batman-adv/CHANGELOG net/batman-adv/Makefile.kbuild net/batman-adv/README.external
commit 18491357187f9fb8f0e56eb4a9a8af8f793dfd08 Merge: 2caa9e1 f05ad81 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sun Mar 3 18:32:50 2013 +0100
Merge remote-tracking branch 'origin/next'
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit f05ad81a69b7bd77ed624e4d1de554e663ed8270 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sun Mar 3 18:30:29 2013 +0100
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 4230486765c9a23321811149aaf081d38fd09b3c Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Mar 2 16:05:24 2013 +0100
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 95a3a7c7f15789b8578bc6e93ff1a21498297030 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Mar 2 16:06:14 2013 +0100
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit ae583367fe20b4e123c59ed17072d11bbd6f321a Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Mar 2 16:12:59 2013 +0100
batman-adv: Update Makefile copyright years
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 2caa9e1a656f825d24a2517383bf30877753be40 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Thu Feb 28 12:08:47 2013 +0100
batman-adv: change compat code to remove sparse warning
The latest compat patch fixing rtnl ops compile errors from 2.6.32 ("batman-adv: add compat support for the new netlink ops") fixes the compilation, but leaves some sparse errors: batman-adv/soft-interface.c:573:10: warning: Initializer entry defined twice batman-adv/soft-interface.c:574:10: also defined here
This patch uses another approach by moving the initializers in a dummy struct instead. This also removes the sparse errors.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Antonio Quartulli ordex@autistici.org
commit 5e57e3bff429cd403f0e30af69cf87a2cd55598f Author: Antonio Quartulli ordex@autistici.org Date: Sat Feb 16 14:42:39 2013 +0100
batman-adv: free an hard-interface before adding it
When adding a new hard interface (e.h. wlan0) to a soft interface (e.g. bat0) and the former is already enslaved in another virtual interface (e.g. a software bridge) batman-adv has to free the it first and then continue with the adding mechanism.
In this way the behaviour becomes consistent with what "ip link set master" does. At the moment batman-adv enslaves the hard interface without checking for the master device, possibly causing strange behaviours which are never wanted by the users.
Reported-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 988f5b2d1a660636633e477c20ec24f6e471731e Author: Antonio Quartulli ordex@autistici.org Date: Wed Feb 20 15:57:31 2013 +0100
batman-adv: add compat support for the new netlink ops
This patches enable the new rtnl ops to compile on kernels starting from 2.6.32
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de Tested-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 17d1d49db3f5b975ad506fb90bd2f88874e8a542 Author: Antonio Quartulli ordex@autistici.org Date: Sat Feb 16 13:50:52 2013 +0100
batman-adv: make batadv_softif_destroy_netlink() static
batadv_softif_destroy_netlink() is used in the file where it is defined only, therefore it must be static.
Introduced by 5317331775c3168b8155b03ec89b1c4c508b9043 ("batman-adv: Allow to use rntl_link for device creation/deletion")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 5ac557ac6243cd005a2e1c1904dbb1ead4d0d705 Merge: edd0853 054c44a Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Feb 16 18:52:43 2013 +0800
Merge branch 'next'
commit 054c44ae920451ddfe38d812beeda0ef79ce0389 Merge: 46360b2 9f1fb69 Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Feb 16 18:51:58 2013 +0800
Merge branch 'maint' into next
commit 9f1fb6914d66e282c2b1f51aa2d4a231c84df84d Author: Pau Koning paukoning@gmail.com Date: Fri Feb 15 00:18:56 2013 +0100
batman-adv: Fix NULL pointer dereference in DAT hash collision avoidance
An entry in DAT with the hashed position of 0 can cause a NULL pointer dereference when the first entry is checked by batadv_choose_next_candidate. This first candidate automatically has the max value of 0 and the max_orig_node of NULL. Not checking max_orig_node for NULL in batadv_is_orig_node_eligible will lead to a NULL pointer dereference when checking for the lowest address.
This problem was added in 785ea1144182c341b8b85b0f8180291839d176a8 ("batman-adv: Distributed ARP Table - create DHT helper functions").
Signed-off-by: Pau Koning paukoning@gmail.com Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit edd08535c00a42143989118bc999060893ce0a41 Author: Sven Eckelmann sven@narfation.org Date: Mon Feb 11 17:10:27 2013 +0800
batman-adv: Allow to modify slaves of soft-interfaces through rntl_link
The sysfs configuration interface of batman-adv to add/remove slaves of an soft-iface is not deadlock free and doesn't follow the currently common way to modify slaves of an interface.
An additional configuration interface though rtnl_link is introduced which provides easy device adding/removing with tools like "ip": $ ip link set dev eth0 master bat0 $ ip link set dev eth0 nomaster
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Antonio Quartulli ordex@autistici.org
commit 5317331775c3168b8155b03ec89b1c4c508b9043 Author: Sven Eckelmann sven@narfation.org Date: Mon Feb 11 17:10:26 2013 +0800
batman-adv: Allow to use rntl_link for device creation/deletion
The sysfs configuration interface of batman-adv to add/remove soft-interfaces is not deadlock free and doesn't follow the currently common way to create new virtual interfaces.
An additional interface though rtnl_link is introduced which provides easy device creation/deletion with tools like "ip":
$ ip link add dev bat0 type batadv $ ip link del dev bat0
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit b047bd8f7b3c039d792022ada7382de63b87cfb2 Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Feb 11 17:10:25 2013 +0800
batman-adv: rename batadv_softif_destroy to reflect sysfs use case
Signed-off-by: Marek Lindner lindner_marek@yahoo.de CC: Sven Eckelmann sven@narfation.org Acked-by: Antonio Quartulli ordex@autistici.org
commit c3c7e74c5f2c5b81be6b60399e80962fd6d6fbf6 Author: Sven Eckelmann sven@narfation.org Date: Mon Feb 11 17:10:24 2013 +0800
batman-adv: Don't always delete softif when last slave was removed
batman-adv has an unusual way to manage softinterfaces. These will be created automatically when a user writes to the batman-adv/mesh_iface file in sysfs and removed when no slave device exists anymore.
This behaviour cannot be changed without breaking compatibility with existing code. Instead other interfaces should be able to slightly reduce this behaviour and provide a more common reaction to a removal of a slave interface.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Antonio Quartulli ordex@autistici.org
commit ab8f433dd39be94e8617cff2dfe9f7eca162eb15 Author: Sven Eckelmann sven@narfation.org Date: Mon Feb 11 17:10:23 2013 +0800
batman-adv: Move deinitialization of soft-interface to destructor
The deinitialization of the soft-interface created in ndo_init/constructor should be done in the destructor and not directly before calling unregister_netdevice
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Antonio Quartulli ordex@autistici.org
commit 03522f0bb9d04c0834700db95f42f6bbcd5f8dd7 Author: Sven Eckelmann sven@narfation.org Date: Mon Feb 11 17:10:22 2013 +0800
batman-adv: Move soft-interface initialization to ndo_init
The initialization of an net_device object should be done in the init/constructor function and not from the outside after the register_netdevice was done to avoid race conditions.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Antonio Quartulli ordex@autistici.org
commit 98c8a098aaa3ecec877a24cc07b4d72a2366666d Author: Martin Hundebøll martin@hundeboll.net Date: Wed Jan 30 08:27:28 2013 +0100
batman-adv: Fix alignment of batadv_nc_hash_key_gen
Move second argument to first line and align third argument to the opening parenthesis.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 65aa656f3be9d78314c675e3d8792bf5a55560fb Author: Martin Hundebøll martin@hundeboll.net Date: Fri Jan 25 11:12:43 2013 +0100
batman-adv: network coding - receive coded packets and decode them
When receiving a network coded packet, the decoding buffer is searched for a packet to use for decoding. The source, destination, and crc32 from the coded packet is used to identify the wanted packet. The decoded packet is passed to the usual unicast receiver function, as had it never been network coded.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit aa45b9b5e86d8315a08beb644deee74ea6274f6e Author: Martin Hundebøll martin@hundeboll.net Date: Fri Jan 25 11:12:42 2013 +0100
batman-adv: network coding - save overheard and tx packets for decoding
To be able to decode a network coded packet, a node must already know one of the two coded packets. This is done by buffering skbs before transmission and buffering packets sniffed with promiscuous mode from other hosts.
Packets are kept in a buffer similar to the one with forward-skbs: A hash table, where each entry, which corresponds to a src-dst pair, has a linked list packets.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit c3289f3650d34b60296000a629c99f2488f7c3dd Author: Martin Hundebøll martin@hundeboll.net Date: Fri Jan 25 11:12:41 2013 +0100
batman-adv: network coding - code and transmit packets if possible
Before adding forward-skbs to the coding buffer, the buffer is searched for a potential coding opportunity. If one is found, the two packets are network coded and transmitted right away. If not, the forward-skb is added to the buffer.
Network coded packets are transmitted with information about the two receivers and the two coded packets. The first receiver is given by the MAC header, while the second is given in the payload/bat-header. The second receiver uses promiscuous mode to receive the packet and check the second destination.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit d28785996ad825f43bfb081327815443765e0cc5 Author: Martin Hundebøll martin@hundeboll.net Date: Fri Jan 25 11:12:40 2013 +0100
batman-adv: network coding - buffer unicast packets before forward
Two be able to network code two packets, one packet must be buffered until the next is available. This is done in a "coding buffer", which is essentially a hash table with lists of packets. Each entry in the hash table corresponds to a specific src-dst pair, which has a linked list of packets that are buffered.
This patch adds skbs to the buffer just before forwarding them. The buffer is traversed every 10 ms, where timed skbs are removed from the buffer and transmitted. To allow experiments with the network coding scheme, the timeout is tunable through a file in debugfs.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3ed7ada3f0bbcd058567bc0a8f9729a73eba7db6 Author: Martin Hundebøll martin@hundeboll.net Date: Fri Jan 25 11:12:39 2013 +0100
batman-adv: network coding - detect coding nodes and remove these after timeout
To use network coding efficiently, a relay must know when neighbor nodes are likely to have enough information to be able to decode a network coded packet. This is detected by using OGMs from batman-adv to discover when one neighbor is in range of another neighbor. The relay check the TLL to detect when an OGM is forwarded from one neighbor by another neighbor, and thereby knows that the two neighbors are in range and thus overhear packets sent by each other.
This information is saved in the orig_node struct to be used when searching for coding opportunities. Two lists are added to the orig_node struct: One for neighbors that can hear the orig_node (outgoing nc_nodes) and one for neighbors that the orig_node can hear (incoming nc_nodes).
Information about nc_nodes is kept for 10 seconds and is available through debugfs in batman_adv/nc_nodes to use when debugging network coding.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 2f92809344e992419ffe083f4feba43f91dcf859 Author: Martin Hundebøll martin@hundeboll.net Date: Fri Jan 25 11:12:38 2013 +0100
batman-adv: network coding - add the initial infrastructure code
Network coding exploits the 802.11 shared medium to allow multiple packets to be sent in a single transmission. In brief, a relay can XOR two packets, and send the coded packet to two destinations. The receivers can decode one of the original packets by XOR'ing the coded packet with the other original packet. This will lead to increased throughput in topologies where two packets cross one relay.
In a simple topology with three nodes, it takes four transmissions without network coding to get one packet from Node A to Node B and one from Node B to Node A:
1. Node A ---- p1 ---> Node R Node B 2. Node A Node R <--- p2 ---- Node B 3. Node A <--- p2 ---- Node R Node B 4. Node A Node R ---- p1 ---> Node B
With network coding, the relay only needs one transmission, which saves us one slot of valuable airtime:
1. Node A ---- p1 ---> Node R Node B 2. Node A Node R <--- p2 ---- Node B 3. Node A <- p1 x p2 - Node R - p1 x p2 -> Node B
The same principle holds for a topology including five nodes. Here the packets from Node A and Node B are overheard by Node C and Node D, respectively. This allows Node R to send a network coded packet to save one transmission:
Node A Node B
| \ / | | p1 p2 | | \ / | p1 > Node R < p2 | | | / \ | | p1 x p2 p1 x p2 | v / \ v / \ Node C < > Node D
More information is available on the open-mesh.org wiki[1].
This patch adds the initial code to support network coding in batman-adv. It sets up a worker thread to do house keeping and adds a sysfs file to enable/disable network coding. The feature is disabled by default, as it requires a wifi-driver with working promiscuous mode, and also because it adds a small delay at each hop.
[1] http://www.open-mesh.org/projects/batman-adv/wiki/Catwoman
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 58ad6a50d49f703efc4b19f52256bf3c31113c0b Merge: 951874d 46360b2 Author: Antonio Quartulli ordex@autistici.org Date: Mon Jan 28 20:35:51 2013 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
commit cfc790ddceebe44206329eaacd906bd75b6218ce Merge: a365cf4 46360b2 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Jan 29 01:23:14 2013 +0800
Merge branch 'next'
commit 46360b2a2df3226e9c69ae1e9e7d64b6f18dcf4b Author: Antonio Quartulli ordex@autistici.org Date: Thu Jan 24 11:41:39 2013 +0100
batman-adv: fix local translation table output
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
commit 951874dabd1c8766e74905ed5bff691b8c04e6f3 Merge: 30664a7 ab361a9 Author: Antonio Quartulli ordex@autistici.org Date: Sun Jan 27 13:59:43 2013 +0100
Merge remote-tracking branch 'pkg/maint' into merge/master
commit a365cf492099993c10ba6085ccf9528f7dbe3e9f Author: Antonio Quartulli ordex@autistici.org Date: Tue Jan 15 22:17:19 2013 +1000
batman-adv: don't use !! in bool conversion
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
commit ff41008f82fe469b1bbffb45221f9ef0b4eaf494 Author: Martin Hundebøll martin@hundeboll.net Date: Mon Jan 14 00:20:32 2013 +0100
batman-adv: Return reason for failure in batadv_check_unicast_packet()
batadv_check_unicast_packet() is changed to return a value based on the reason to drop the packet, which will be useful information for future users of batadv_check_unicast_packet().
Signed-off-by: Martin Hundebøll martin@hundeboll.net Acked-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 8d58064e5e3420e86de6d10d6956c1e4c34f4ea9 Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Jan 12 19:19:06 2013 +0800
batman-adv: replace redudant primary_if_get calls
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
commit c23b3d3cd0ded371943c39d27aba4e87fd84d51d Merge: efcf448 ab361a9 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Jan 27 08:37:26 2013 +0800
Merge branch 'maint' into next
commit ab361a9ccc584e7501c06bfe1c00cb0411feebaf Author: Matthias Schiffer mschiffer@universe-factory.net Date: Thu Jan 24 18:18:27 2013 +0100
batman-adv: filter ARP packets with invalid MAC addresses in DAT
We never want multicast MAC addresses in the Distributed ARP Table, so it's best to completely ignore ARP packets containing them where we expect unicast addresses.
Signed-off-by: Matthias Schiffer mschiffer@universe-factory.net Acked-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3b24193d7cfc18f0cc005811ca4aab3479c2f1c6 Author: Matthias Schiffer mschiffer@universe-factory.net Date: Thu Jan 24 18:18:26 2013 +0100
batman-adv: check for more types of invalid IP addresses in DAT
There are more types of IP addresses that may appear in ARP packets that we don't want to process. While some of these should never appear in sane ARP packets, a 0.0.0.0 source is used for duplicate address detection and thus seen quite often.
Signed-off-by: Matthias Schiffer mschiffer@universe-factory.net Acked-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit efcf448c066e199a5abddf7b5deefeae7bae00d6 Merge: 1d8cfbf 977d8c6 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Jan 24 21:30:26 2013 +0800
Merge branch 'maint' into next
commit 977d8c6f9253ad71e4bd8e4be2705c3bee684feb Author: Matthias Schiffer mschiffer@universe-factory.net Date: Wed Jan 23 18:11:53 2013 +0100
batman-adv: fix skb leak in batadv_dat_snoop_incoming_arp_reply()
The callers of batadv_dat_snoop_incoming_arp_reply() assume the skb has been freed when it returns true; fix this by calling kfree_skb before returning as it is done in batadv_dat_snoop_incoming_arp_request().
Signed-off-by: Matthias Schiffer mschiffer@universe-factory.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Antonio Quartulli ordex@autistici.org
commit 30664a70de5e9e184497d96da075f563b6b217dc Merge: d4b2e47 1d8cfbf Author: Antonio Quartulli ordex@autistici.org Date: Tue Jan 15 21:15:21 2013 +1000
Merge remote-tracking branch 'pkg/next' into merge/master
Conflicts: net/batman-adv/CHANGELOG net/batman-adv/README.external net/batman-adv/compat.h
commit 1d8cfbfc41fafaed57be1d3116e8736a20bc779d Merge: a33c882 8673883 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Mon Jan 14 13:57:48 2013 +0100
Merge remote-tracking branch 'origin/next'
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 86738838470f7d3f868ae9b60bc198cf58efac88 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Jan 12 16:44:06 2013 +0100
batman-adv: Start new development cycle
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 50286489044e2029064f2b8c7a66b4a6264be193 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Jan 12 12:26:27 2013 +0100
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 8ee36af06409e3708c052a0d3803fc34cc02eb8c Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Sat Jan 12 12:48:59 2013 +0100
batman-adv: Update compatible kernel version number
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit a33c882c10692b99ce647c929cb90c62e87fa083 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Fri Jan 11 10:19:51 2013 +0100
batman-adv: postpone sysfs removal when unregistering
When processing the unregister notify for a hard interface, removing the sysfs files may lead to a circular deadlock (rtnl mutex <-> s_active).
To overcome this problem, postpone the sysfs removal in a worker.
Reported-by: Sasha Levin sasha.levin@oracle.com Reported-by: Sven Eckelmann sven@narfation.org Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit efccb1977b070208ebca30656102d44ddab2397b Author: Jiri Pirko jiri@resnulli.us Date: Wed Jan 9 15:30:53 2013 +0800
batman-adv: fix drvinfo strings set in drivers
Use strlcpy where possible to ensure the string is \0 terminated. Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN and custom defines. Use snprintf instead of sprint. Remove unnecessary inits of ->fw_version Remove unnecessary inits of drvinfo struct.
Signed-off-by: Jiri Pirko jiri@resnulli.us Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit dfb46497a3a26526c6d3c0e16c477b2bad231ada Author: Jiri Pirko jiri@resnulli.us Date: Wed Jan 9 14:50:21 2013 +0800
batman-adv: remove unnecessary NET_ADDR_RANDOM "bitclean"
NET_ADDR_SET is set in dev_set_mac_address() no need to alter dev->addr_assign_type value in drivers.
Signed-off-by: Jiri Pirko jiri@resnulli.us Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit d4b2e47e01b0d8db93c9fa4d1e5a7ce3015e3c5b Merge: 9b99ead 71c8a70 Author: Antonio Quartulli ordex@autistici.org Date: Mon Jan 7 11:47:03 2013 +0100
Merge remote-tracking branch 'pkg/master' into merge/master
Conflicts: net/batman-adv/compat.c net/batman-adv/compat.h
commit 71c8a70ba420657d1f548c6f5edb2bbd92ef5e17 Merge: 02c5591 4f3c4472 Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Jan 5 02:00:05 2013 +0800
Merge branch 'next'
commit 4f3c4472e4fa5257f2156f2848abf486c864d05a Author: Antonio Quartulli ordex@autistici.org Date: Fri Jan 4 03:05:31 2013 +0100
batman-adv: update copyright years
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit c383992d762761c4774bbc04d1d1aa347c5abc6d Author: Antonio Quartulli ordex@autistici.org Date: Fri Jan 4 03:05:09 2013 +0100
batman-adv: Start new development cycle
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9b99eadb69452e4bde86339a6be15930b2b5b0f8 Merge: 7fdeafc 0790d01 Author: Antonio Quartulli ordex@autistici.org Date: Fri Jan 4 04:46:00 2013 +0100
Merge remote-tracking branch 'pkg/master' into merge/master
Conflicts: net/batman-adv/compat.h
commit 7fdeafc297a78544c50ab564e44ecb32c6281862 Merge: 05d13fc a49f0d1 Author: Antonio Quartulli ordex@autistici.org Date: Fri Jan 4 04:44:58 2013 +0100
Merge tag 'v3.8-rc1' into merge/master
Linux 3.8-rc1
commit 02c55911ea4484abdf72f70f8a576d1e855a34c3 Author: Akinobu Mita akinobu.mita@gmail.com Date: Mon Dec 24 11:14:07 2012 +0900
batman-adv: rename random32() to prandom_u32()
Use more preferable function name which implies using a pseudo-random number generator.
Signed-off-by: Akinobu Mita akinobu.mita@gmail.com Acked-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de Cc: Simon Wunderlich siwu@hrz.tu-chemnitz.de Cc: Antonio Quartulli ordex@autistici.org Cc: b.a.t.m.a.n@lists.open-mesh.org Cc: "David S. Miller" davem@davemloft.net Cc: netdev@vger.kernel.org
commit 2191c1bcbc646ea9830c76a540b37b91af73fa72 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Dec 25 21:45:12 2012 +0800
batman-adv: kernel doc for types.h
Thanks to Sven Eckelmann and Simon Wunderlich for their support.
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 6068b6a880d986de7a77ebe075e27c95465e293c Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Dec 25 17:03:25 2012 +0800
batman-adv: rename batadv_claim struct to make clear it is used by bla
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 42dca84e5587bb0882b853f460da67f4921e838b Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Dec 25 17:03:24 2012 +0800
batman-adv: rename batadv_backbone_gw struct to make clear it is used by bla
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit f7628c84c4d50372df70e09b0fea5f0631580ef3 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Dec 25 17:03:23 2012 +0800
batman-adv: rename batadv_recvlist_node struct to make clear it is used by vis
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit bce955a42a08161eedd3dde3bd3824925da5d980 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Dec 25 17:03:22 2012 +0800
batman-adv: rename batadv_if_list_entry struct to make clear it is used by vis
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit f187faf1437c54ba7f8320efc2457a48b8244005 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Dec 25 17:03:21 2012 +0800
batman-adv: group tt type definitions together
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit adb7629738b2a601abce688d9c9f1df4f2fb9264 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Dec 25 17:03:20 2012 +0800
batman-adv: mark debug_log struct as bat_priv only struct
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 1dfd7e82ca6d43a527135b0df02f06a162812a43 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Dec 25 17:03:19 2012 +0800
batman-adv: align kernel doc properly
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3cf467a65ffad32d58c3b449c3e71113c5a8d22f Merge: ecee9b7 d16bbc8 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Dec 27 12:33:11 2012 +0800
Merge branch 'next'
commit d16bbc8016e87757ff3688ef5678fd07b6085736 Author: Akinobu Mita akinobu.mita@gmail.com Date: Wed Dec 26 21:32:10 2012 +0900
batman-adv: fix random jitter calculation
batadv_iv_ogm_emit_send_time() attempts to calculates a random integer in the range of 'orig_interval +- BATADV_JITTER' by the below lines.
msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER; msecs += (random32() % 2 * BATADV_JITTER);
But it actually gets 'orig_interval' or 'orig_interval - BATADV_JITTER' because '%' and '*' have same precedence and associativity is left-to-right.
This adds the parentheses at the appropriate position so that it matches original intension.
Signed-off-by: Akinobu Mita akinobu.mita@gmail.com Acked-by: Antonio Quartulli ordex@autistici.org Cc: Marek Lindner lindner_marek@yahoo.de Cc: Simon Wunderlich siwu@hrz.tu-chemnitz.de Cc: Antonio Quartulli ordex@autistici.org Cc: b.a.t.m.a.n@lists.open-mesh.org Cc: "David S. Miller" davem@davemloft.net Cc: netdev@vger.kernel.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit ecee9b7a6d19e8c515c561d17fa5aaa7a45be00e Author: Antonio Quartulli ordex@autistici.org Date: Tue Dec 25 13:14:37 2012 +0100
batman-adv: a delayed_work has to be initialised once
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
commit 0790d0135d49922ecff8a355ee2a5eee113f2760 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Dec 16 13:53:15 2012 +0800
batman-adv: unbloat batadv_priv if debug is not enabled
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit a1bd46b003e5d546bac3bea82690ad590143b6af Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Dec 15 19:09:11 2012 +0800
batman-adv: remove unused variable from orig_node struct
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit a42b051cae39cf1882fd2dfeab0d31d99d969577 Author: Antonio Quartulli ordex@autistici.org Date: Tue Dec 11 20:29:22 2012 +0100
batman-adv: fix typo in debug message
in bat_iv_ogm.c a debug message should print "tq" instead of "td"
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 6f9250bf4b14cae4d006052f95a3a8169b27b605 Author: Antonio Quartulli antonio@open-mesh.com Date: Fri Dec 7 14:35:36 2012 +0100
batman-adv: use the const qualifier in hash functions
The data argument in each hash function should carry the "const" qualifier as it is never modified.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit c13023b7d5f57494ebcd42ae4512afe0fc452383 Author: Antonio Quartulli ordex@autistici.org Date: Mon Nov 26 01:27:29 2012 +0100
batman-adv: don't compile the BLA switch if not requested
When the Bridge Loop Avoidance component is not compiled-in, its boolean switch should be not compiled as well. This patch surrounds the switch with a proper ifdef.
This behaviour was introduced by 9fd6b0615b5499b270d39a92b8790e206cf75833 ("batman-adv: add bridge loop avoidance compile option")
Signed-off-by: Antonio Quartulli ordex@autistici.org Acked-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 15727323d9f8864b2d41930940acc38de987045a Author: Antonio Quartulli ordex@autistici.org Date: Thu Nov 29 04:54:45 2012 +0100
batman-adv: don't print the last_seen time for bat0 TT local entry
bat0 MAC address will never deleted from the local translation table, therefore printing its last_Seen time is useless and will also produce ugly output and eventually a variable overflow.
This was introduced by 59cb0861498776c62bd17584c31f34477fa301a0 ("batman-adv: improve local translation table output")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 25d7e064bc219596bfe3c4d07248fd0417af3071 Author: Antonio Quartulli ordex@autistici.org Date: Thu Nov 29 01:03:31 2012 +0100
batman-adv: remove useless NULL check
debugfs_remove_recursive() checks whether its argument is not null on its own, therefore it is possible to remove the external check.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3d278d69e7407863f8697b050eea4c4bab70702c Author: Antonio Quartulli ordex@autistici.org Date: Sat Dec 1 02:32:01 2012 +0100
batman-adv: remove useless blank lines before and after brackets
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 6ca1b358381e5dc199cd1f8bc739c71fa6a486ca Author: Antonio Quartulli ordex@autistici.org Date: Sat Nov 10 11:00:32 2012 +0100
batman-adv: Initialize lockdep class keys for hashes
Different hashes have the same class key 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
commit 05d13fc3d3518d6125e28793f6db2b47198a1042 Merge: 76c3bf9 87907ac Author: Antonio Quartulli ordex@autistici.org Date: Fri Nov 30 10:47:24 2012 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
Conflicts: net/batman-adv/compat.h
commit 72b4ce07d0613b0b6f65171b0e89ef0b5648a6ea Merge: 1da1935 87907ac Author: Marek Lindner lindner_marek@yahoo.de Date: Fri Nov 30 17:38:54 2012 +0800
Merge branch 'next'
commit 87907ac0ab83e0d91f0436298af9f87c59dbc62c Author: Antonio Quartulli ordex@autistici.org Date: Mon Nov 26 00:38:50 2012 +0100
batman-adv: use ETH_P_BATMAN
The ETH_P_BATMAN ethertype is now defined kernel-wide. Use it instead of the private BATADV_ETH_P_BATMAN define.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 76c3bf90141655b220fed95bc194e0518fc05ed1 Merge: 3e51b89 eba8ed0 Author: Antonio Quartulli ordex@autistici.org Date: Wed Nov 21 12:33:01 2012 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
commit 1da19357fa79bf7d4a245fd0089129364d4e716b Merge: 1f59c6d eba8ed0 Author: Marek Lindner lindner_marek@yahoo.de Date: Wed Nov 21 14:37:17 2012 +0800
Merge branch 'next'
commit eba8ed0c3326efb644341e604e2a6640ba3cac87 Author: Antonio Quartulli ordex@autistici.org Date: Tue Nov 20 20:44:15 2012 +0100
Revert "batman-adv: export compatibility version via debugfs"
This reverts commit 0679ec75758588e185ceec11e5823de65b427a6f.
Conflicts: main.c main.h
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 1f59c6d63e93bbf7c9c0afa7f67d484a237ad75b Author: Antonio Quartulli ordex@autistici.org Date: Mon Nov 19 09:01:44 2012 +0100
batman-adv: remove useless assignment in tt_local_add()
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
commit 6dc9df56b19cbbe75bf81c220db9e4acf9ad6cc5 Author: Antonio Quartulli ordex@autistici.org Date: Mon Nov 19 09:01:43 2012 +0100
batman-adv: unify and properly print hex values
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
commit df64b118d5d05c2aa060a5c71bd4453f6948832a Author: Antonio Quartulli ordex@autistici.org Date: Mon Nov 19 09:01:42 2012 +0100
batman-adv: print the CRC together with the translation tables
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
commit 3e51b89dc683c8814ac06410e9b0aaff660148ed Merge: 4e4c770 e8f5746 Author: Antonio Quartulli ordex@autistici.org Date: Mon Nov 19 08:52:19 2012 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
commit ca8b54687976f8bc8d90ecd556cd4b206aedabed Merge: 704252b e8f5746 Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Nov 19 11:45:21 2012 +0800
Merge branch 'next'
commit e8f5746f6d638d2e9e08596f312652dbe453284f Author: Antonio Quartulli ordex@autistici.org Date: Sun Nov 18 12:52:39 2012 +0100
batman-adv: use batadv_compare_eth instead of memcmp
When comparing ethernet address the batadv_compare_eth function has to be used instead of memcmp.
This was introduced by 923d5d148cdd0928c9c5f8e0e2024f585dcf6efd ("batman-adv: fix bla compare function")
Signed-off-by: Antonio Quartulli ordex@autistici.org Acked-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 4e4c770352f96df09cb2c336bb3fe6ea9d8beaf4 Merge: aa02021 803bae0 Author: Antonio Quartulli ordex@autistici.org Date: Wed Nov 14 20:42:47 2012 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
commit 704252bc6da5a96e3d741fbb1a039ab7afc8187d Merge: 59cb086 803bae0 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Nov 15 00:33:58 2012 +0800
Merge branch 'next'
commit 803bae00f0ed480ed4be0b28792847162b0b91bc Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Wed Nov 14 10:53:48 2012 +0100
batman-adv: pass value in batadv_hash_bytes
Passing the hash value by reference creates unneeded overhead. Pass by value instead.
Reported-by: David Miller davem@davemloft.net Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 59cb0861498776c62bd17584c31f34477fa301a0 Author: Antonio Quartulli ordex@autistici.org Date: Thu Nov 8 22:16:16 2012 +0100
batman-adv: improve local translation table output
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
commit 736dcf6b27f6fcbcd3099cd9482a0b6f13bcf215 Author: Antonio Quartulli ordex@autistici.org Date: Thu Nov 8 22:16:15 2012 +0100
batman-adv: reduce local TT entry timeout to 10 minutes
The current timeout is set to one hour. However a client connected to the mesh network will always generate traffic. In the worst case it will send ARP requests every 4 or 5 minutes. On the other hand having a long timeout means storing dead entries for one hour leads to very big trans-tables containing useless clients.
This patch reduces the timeout to 10 minutes
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9868989393a9a99b9dc33bbcd588ad997d300ffa Author: Linus Lüssing linus.luessing@web.de Date: Wed Oct 17 15:07:35 2012 +0200
batman-adv: Do not add multicast MAC addresses to translation table
The current translation table mechanism is not suitable for multicast addresses and we are currently flooding such frames anyway.
Therefore this patch prevents multicast MAC addresses being added to the translation table.
Signed-off-by: Linus Lüssing linus.luessing@web.de Acked-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit f8b19e13d8d8b233384d723ee2b2b54d011fb90c Author: Shan Wei davidshan@tencent.com Date: Tue Nov 13 09:53:26 2012 +0800
batman-adv: use per_cpu_add helper
this_cpu_add is an atomic operation. and be more faster than per_cpu_ptr operation.
Signed-off-by: Shan Wei davidshan@tencent.com Reviewed-by: Christoph Lameter cl@linux.com Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit aa020218f6126ca8b4c2a2deb2a640cace665aa2 Merge: 9466877 7f05664 Author: Antonio Quartulli ordex@autistici.org Date: Tue Nov 13 09:51:18 2012 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
commit 7f05664526b213452f2d1bc8f2e120899752f15d Author: Antonio Quartulli ordex@autistici.org Date: Mon Nov 12 20:48:21 2012 +0100
batman-adv: remove useless !! when converting to bool
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 the "!!" conversion can be removed.
This was introduced by 3fbd7ac8c71b3778c5751b3d096ea36f96ef534e ("batman-adv: substitute tt_poss_change with a per-tt_entry flag")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit f9f727d6b2c068bebeeb0b502da6ac9bd530e07e Merge: bc91a4a 4dba221 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Nov 13 16:32:58 2012 +0800
Merge branch 'maint' into next
commit 4dba2215b3b1cb7e61431165a1db1adef5c1f9e5 Author: Antonio Quartulli ordex@autistici.org Date: Thu Nov 8 21:55:30 2012 +0100
batman-adv: process broadcast packets in BLA earlier
The logic in the BLA mechanism may decide to drop broadcast packets because the node may still be in the setup phase. For this reason, further broadcast processing like the early client detection mechanism must be done only after the BLA check.
This patches moves the invocation to BLA before any other broadcast processing.
This was introduced by 724d05c8215e4e8186097121595ef20b6ba601b7 ("batman-adv: detect not yet announced clients")
Reported-by: Glen Page glen.page@thet.net Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 9b5c6ae19e49fcfe1cc353aabc6a79a487a957ce Author: Antonio Quartulli ordex@autistici.org Date: Thu Nov 8 21:55:29 2012 +0100
batman-adv: don't add TEMP clients belonging to other backbone nodes
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 724d05c8215e4e8186097121595ef20b6ba601b7 ("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
commit 94668774eec54bf17022f005c47ba3d9aa237e4e Merge: 3b9bceb bc91a4a Author: Antonio Quartulli ordex@autistici.org Date: Fri Nov 9 11:27:09 2012 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
commit bc91a4a7e00c9610dd6285e5ca8bea9cb208cbe7 Author: Antonio Quartulli ordex@autistici.org Date: Wed Nov 7 21:07:35 2012 +0100
batman-adv: fix kernel-doc for batadv_reroute_unicast_packet()
This was introduced by ("batman-adv: substitute tt_poss_change with a per-tt_entry flag")
Reported-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 79dc2c28f6c18f6010f11d5ecc3612839c304a27 Merge: 7cfe135 d46bf9e Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Nov 8 21:35:43 2012 +0800
Merge branch 'maint' into next
commit d46bf9e69b31908d0b2eb4efad1e879ec5502490 Author: Antonio Quartulli ordex@autistici.org Date: Thu Nov 8 14:21:11 2012 +0100
batman-adv: correctly pass the client flag on tt_response
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 ("batman-adv: detect not yet announced clients")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit fa614fd04692d7cf812ef47f3b6e4eba7bab3ee4 Author: Antonio Quartulli ordex@autistici.org Date: Wed Nov 7 15:05:33 2012 +0100
batman-adv: fix tt_global_entries flags update
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 ("batman-adv: detect not yet announced clients")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 7cfe1356958b6e654b58ce52bfbbc0218cd25d86 Author: Antonio Quartulli ordex@autistici.org Date: Tue Nov 6 12:05:23 2012 +0100
batman-adv: fix local client recognition in is_my_client()
A tt_local_entry which ROAM flag is set cannot be considered a local client anymore. Having the ROAM flag set means that the client roamed away and that the nodes received a ROAMING_ADV for such event
This was introduced by ("batman-adv: roaming handling mechanism redesign")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3b9bcebb9aa41474afaee34286d8a09a751a66fa Merge: b345bfb fe43315 Author: Antonio Quartulli ordex@autistici.org Date: Wed Nov 7 17:28:53 2012 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
commit b8416c21f9fe6c34ff4eac0cdccd5f0a922120a8 Author: Antonio Quartulli ordex@autistici.org Date: Tue Nov 6 12:05:22 2012 +0100
batman-adv: send ROAMING_ADV once
If a client roaming has already been advertised, the node should prevent it from doing the same more than once. To achieve this, the node has to check the ROAM flag on the global client: if this is set already, then the ROAMING_ADV for this client has already been sent.
This should be merged with changes done by ("batman-adv: roaming handling mechanism redesign")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit fe4331557dd8bd702b592b9b899242af3284ca77 Author: Antonio Quartulli ordex@autistici.org Date: Tue Nov 6 12:05:21 2012 +0100
batman-adv: remove useless goto
This was introduced by ("batman-adv: roaming handling mechanism redesign")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 44d6e4a955113f9c8db67d2b8518bc5b6c2ac12a Author: Antonio Quartulli ordex@autistici.org Date: Tue Nov 6 12:05:20 2012 +0100
batman-adv: fix debug message
In case of re-routing, the old_ttvn must be saved before being overwritten, otherwise the debug message will obviously print the new one.
This was introduced by ("batman-adv: substitute tt_poss_change with a per-tt_entry flag")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3bd73df4874a2f73e8630caba7025910e437c803 Author: Antonio Quartulli ordex@autistici.org Date: Tue Nov 6 12:05:19 2012 +0100
batman-adv: fix TT packet rerouting
When the node checks for a packet to be re-routed or not, first it should consider whether the destination is a local client. Only after this check, the node can eventually search the global table.
This was introduced by ("batman-adv: substitute tt_poss_change with a per-tt_entry flag")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit cc9fb912f01cf8069b1e4f131f2f93db52289b2d Author: Sven Eckelmann sven@narfation.org Date: Mon Nov 5 10:15:24 2012 +0100
batman-adv: Fix alignment for payload after batadv_unicast_4addr_packet
batadv_unicast_4addr_packet created an odd aligned ethernet header and a not 4 bytes boundary aligned IP header. Adding an extra reserved bytes avoids this problem.
This problem was introduced in 78fc6bbe0aca868b65b92723b1e259e7ef7b35c0 ("batman-adv: add UNICAST_4ADDR packet type")
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 846815f0af43bdc2c58cb5e1b64c158edefda16e Author: Antonio Quartulli ordex@autistici.org Date: Mon Nov 5 16:34:34 2012 +0100
batman-adv: fix ROAM flag de-selection
In tt_global_add() the ROAM flag is improperly unset. This makes the next check fail and so preventing emptying the old originator_list for the involved tt_global_entry
This was introduced by ("batman-adv: roaming handling mechanism redesign")
Signed-off-by: Antonio Quartulli ordex@autistici.org Reported-by: Mike Burmeister-Brown mike@open-mesh.com Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 52f79c4ec1ca6255ff13284bf3c628e894e25f45 Author: Sven Eckelmann sven@narfation.org Date: Mon Nov 5 21:25:27 2012 +0100
batman-adv: Use packing of 2 for all headers before an ethernet header
All packet headers in front of an ethernet header have to be completely divisible by 2 but not by 4 to make the payload after the ethernet header again 4 bytes boundary aligned.
A packing of 2 is necessary to avoid extra padding at the end of the struct caused by a structure member which is larger than two bytes. Otherwise the structure would not fulfill the previously mentioned rule to avoid the misalignment of the payload after the ethernet header. It may also lead to leakage of information when the padding it not initialized before sending.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 48ff5dcceeb4ee96825f4552f73eef0e1bc1c1e0 Author: Marek Lindner lindner_marek@yahoo.de Date: Wed Nov 7 23:01:35 2012 +0800
batman-adv: fix david compatibility regression
This was introduced by ("batman-adv: Mark correctly aligned headers not as __packed")
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit e754ea05decb4593e52eb6bfae63b734eda421b9 Author: Sven Eckelmann sven@narfation.org Date: Mon Nov 5 21:25:26 2012 +0100
batman-adv: Mark correctly aligned headers not as __packed
Headers which are already perfectly aligned and create a 4 byte boundary non-ethernet header payload can have the __packed attribute removed. The __packed attribute doesn't change the appeareance of the packet for these headers because no extra padding is necessary to align the data members. The compiler will also create slightly faster code for loads of multi-byte members.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 7f91790974c258e71a62f6dee8cb1dbe5dff36c3 Author: Sven Eckelmann sven@narfation.org Date: Sun Nov 4 17:11:45 2012 +0100
batman-adv: Reserve extra bytes in skb for better alignment
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
commit b345bfb392e96d2cda71dbae0a83bc62c121ed03 Merge: 3a86e3b 59f8434 Author: Antonio Quartulli ordex@autistici.org Date: Fri Nov 2 21:37:41 2012 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
Conflicts: net/batman-adv/CHANGELOG net/batman-adv/README.external
commit 59f8434532df02aa9956b3f51d8abb71ced30625 Author: Antonio Quartulli ordex@autistici.org Date: Mon Oct 29 15:38:08 2012 +0100
batman-adv: free the dat hash only if not NULL
It could be the case that the user tries to disable DAT when it is already disabled. To prevent kernel oops, batadv_dat_hash_free() has to check for the hash table pointer being different from NULL before to try to free it.
This was introduced by ("batman-adv: Distributed ARP Table - add runtime switch")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 94d9158644ec219c4d03b39e1c87953b60e7cee6 Author: Antonio Quartulli ordex@autistici.org Date: Mon Oct 29 16:35:29 2012 +0100
batman-adv: don't free resource when DAT is disabled
Freeing all the resources when DAT is disabled need a much more complicated locking system to prevent concurrent enable/disable operations to destroy the internal state of the component. For now it is safe to avoid such freeing operation when DAT is disabled.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 40b9669f4924fbf38c8497fe421ec0b3cbd99be4 Author: Antonio Quartulli ordex@autistici.org Date: Thu Nov 1 01:08:46 2012 +0100
batman-adv: remove useless assignment
Introduced by ("batman-adv: Fix broadcast duplist for fragmentation")
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit f50d9fc9af468ed1e32037414747ad131ed65fad Author: Sven Eckelmann sven@narfation.org Date: Mon Oct 29 17:15:08 2012 +0100
batman-adv: Start new development cycle
Signed-off-by: Sven Eckelmann sven@narfation.org
commit 257c36c1392bb1314265b1f12fcb0bd1c96e37b6 Merge: f72bd3e bb4b5c3 Author: Sven Eckelmann sven@narfation.org Date: Mon Oct 29 17:14:51 2012 +0100
Merge tag 'v2012.4.0'
batman-adv 2012.4.0
commit bb4b5c38c263d149474bc65a252d0019b3c7fc27 Author: Sven Eckelmann sven@narfation.org Date: Mon Oct 29 16:48:36 2012 +0100
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Sven Eckelmann sven@narfation.org
commit a852ed64b2749716d5ceb1a5a3633ef813b7270d Author: Sven Eckelmann sven@narfation.org Date: Mon Oct 29 16:46:35 2012 +0100
batman-adv: Update compatible kernel version number
Signed-off-by: Sven Eckelmann sven@narfation.org
commit 3a86e3b60f762eca150cfa1ccaadfe3423658e96 Merge: 24937d7 f72bd3e Author: Antonio Quartulli ordex@autistici.org Date: Mon Oct 29 09:35:34 2012 +0100
Merge remote-tracking branch 'pkg/master' into merge/master
commit f72bd3ea731be52769f44df7f4c0cc1054ca3902 Author: Sven Eckelmann sven@narfation.org Date: Mon Oct 29 09:16:10 2012 +0100
batman-adv: Remove unused define BAT_ATTR_HIF_UINT
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 24937d754e29a26b0690955585dc99a7fd830db0 Author: Antonio Quartulli ordex@autistici.org Date: Sun Oct 28 11:23:42 2012 +0100
batman-adv: Add BATMAN_ADV_DAT config option in Kconfig
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit e3cd03fec8c528d8bf049bcb9ad58e7bf4dd5d6d Author: Antonio Quartulli ordex@autistici.org Date: Sun Oct 28 11:23:23 2012 +0100
batman-adv: add LIBCRC32C dependancy in Kconfig
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 74b0a86f3c7e9884f0fcd0d055920ce365885972 Merge: 94c4c96 da14489 Author: Antonio Quartulli ordex@autistici.org Date: Sat Oct 27 16:39:28 2012 +0200
Merge remote-tracking branch 'pkg/master' into merge/master
Conflicts: net/batman-adv/sysfs-class-net-batman-adv net/batman-adv/sysfs-class-net-mesh
commit 94c4c96db406fec45fcbba7cdab2aab06a6d6208 Merge: cbf3c88b 3c26295 Author: Antonio Quartulli ordex@autistici.org Date: Sat Oct 27 16:09:38 2012 +0200
Merge remote-tracking branch 'pkg/master' into merge/master
Conflicts: net/batman-adv/Makefile net/batman-adv/Makefile.kbuild net/batman-adv/README net/batman-adv/README.external net/batman-adv/compat.c net/batman-adv/compat.h net/batman-adv/gen-compat-autoconf.sh
commit da144890cbd04784e6abcf694793d91b6107b074 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Thu Oct 18 13:47:42 2012 +0200
batman-adv: Fix broadcast duplist for fragmentation
If the skb is fragmented, the checksum must be computed on the individual fragments, just using skb->data may fail on fragmented data. Instead of doing linearizing the packet, use the new batadv_crc32 to do that more efficiently- it should not hurt replacing the old crc16 by the new crc32.
Reported-by: Sven Eckelmann sven@narfation.org Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit c23260c739356e8662fbe54c26b9afb13e30e445 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Oct 21 17:02:25 2012 +0800
batman-adv: sysfs documentation should keep alphabetical order
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 3c26295d112d709a104561aaad70ac9a327c4fed Author: Sven Eckelmann sven@narfation.org Date: Fri Oct 19 11:51:50 2012 +0200
batman-adv: Simplify crc for skb with skb_prepare_seq_read
a7fe30736a46d203b74e9fb2df3fb4e1d94222bc ("batman-adv: Add function to calculate crc32c for the skb payload") introduced a function that walked through the three different socket buffer classes to compute the crc32 for an skb. This function is affected by many changes to the sk_buff structure in future. This can be avoided by using the sequential read functions to access blocks transparently.
Reported-by: Martin Hundebøll martin@hundeboll.net Reported-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit cbf3c88b7a54dc0e3098a8f7fc8db2333af68eb3 Author: Linus Lüssing linus.luessing@web.de Date: Wed Oct 17 14:53:05 2012 +0200
batman-adv: Fix potential broadcast BLA-duplicate-check race condition
Threads in the bottom half of batadv_bla_check_bcast_duplist() might otherwise for instance overwrite variables which other threads might be using/reading at the same time in the top half, potentially leading to messing up the bcast_duplist, possibly resulting in false bridge loop avoidance duplicate check decisions.
Signed-off-by: Linus Lüssing linus.luessing@web.de Acked-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit f32a547626ff950a846197a66eea4860fa907b7b Author: Linus Lüssing linus.luessing@web.de Date: Wed Oct 17 14:53:04 2012 +0200
batman-adv: Fix broadcast packet CRC calculation
So far the crc16 checksum for a batman-adv broadcast data packet, received on a batman-adv hard interface, was calculated over zero bytes of its content leading to many incoming broadcast data packets wrongly being dropped (60-80% packet loss).
This patch fixes this issue by calculating the crc16 over the actual, complete broadcast payload.
The issue is a regression introduced by ("batman-adv: add broadcast duplicate check").
Signed-off-by: Linus Lüssing linus.luessing@web.de Acked-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 762081b670ba0a234769289746c59af583306a1f Merge: 4e3c233 cca9d02 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Oct 18 18:04:40 2012 +0800
Merge branch 'next'
commit cca9d02f8df36a8273e8059e59c4cc0354a41be5 Author: Sven Eckelmann sven@narfation.org Date: Thu Oct 18 10:48:32 2012 +0200
batman-adv: Fix build of batman-adv without BLA
4c1721b39c8a77c99e8f4de97b5d5d112006406c ("batman-adv: Fix potential broadcast BLA-duplicate-check race condition") introduced a spinlock for bridge loop avoidance which was initialized outside of bla. This causes an build error when BLA is disabled. Instead the batadv_bla_init function should handle the initialization.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 52760489b819aa4799058835ae2e02bf1b104937 Author: Sven Eckelmann sven@narfation.org Date: Thu Oct 18 10:48:31 2012 +0200
batman-adv: Fix regression in bla multiline comment style
4c1721b39c8a77c99e8f4de97b5d5d112006406c ("batman-adv: Fix potential broadcast BLA-duplicate-check race condition") introduced a comment with the wrong line ending.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 4e3c233cbdc129e83ece90a16fd338cb4834a53a Author: Sven Eckelmann sven@narfation.org Date: Thu Oct 18 11:43:54 2012 +0200
batman-adv: Recommend not to change Makefile for configuration
The Makefile suggests to change it to enable or disable features. This resulted in patch submissions with changed Makefile even when this change would not be necessary.
Instead the configuration should be done using the make parameters explained in README.external
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit a7fe30736a46d203b74e9fb2df3fb4e1d94222bc Author: Sven Eckelmann sven@narfation.org Date: Wed Oct 17 21:10:39 2012 +0200
batman-adv: Add function to calculate crc32c for the skb payload
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit b85918b46ed49cba9b1a663f713531c6fca92eaf Merge: 7e86840 4c1721b Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Oct 18 01:56:37 2012 +0800
Merge branch 'next'
commit 4c1721b39c8a77c99e8f4de97b5d5d112006406c Author: Linus Lüssing linus.luessing@web.de Date: Wed Oct 17 14:53:05 2012 +0200
batman-adv: Fix potential broadcast BLA-duplicate-check race condition
Threads in the bottom half of batadv_bla_check_bcast_duplist() might otherwise for instance overwrite variables which other threads might be using/reading at the same time in the top half, potentially leading to messing up the bcast_duplist, possibly resulting in false bridge loop avoidance duplicate check decisions.
Signed-off-by: Linus Lüssing linus.luessing@web.de Acked-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 2cebface808ba2df76e38a813b3d3f3e97497aff Author: Linus Lüssing linus.luessing@web.de Date: Wed Oct 17 14:53:04 2012 +0200
batman-adv: Fix broadcast packet CRC calculation
So far the crc16 checksum for a batman-adv broadcast data packet, received on a batman-adv hard interface, was calculated over zero bytes of its content leading to many incoming broadcast data packets wrongly being dropped (60-80% packet loss).
This patch fixes this issue by calculating the crc16 over the actual, complete broadcast payload.
The issue is a regression introduced by ("batman-adv: add broadcast duplicate check").
Signed-off-by: Linus Lüssing linus.luessing@web.de Acked-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 7e868408a44316e9523ff42b97c51c0d99dcd554 Author: Martin Hundebøll martin@hundeboll.net Date: Tue Oct 16 16:13:48 2012 +0200
batman-adv: Add wrapper to look up neighbor and send skb
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
commit 0679ec75758588e185ceec11e5823de65b427a6f Author: Antonio Quartulli ordex@autistici.org Date: Tue Oct 16 10:04:40 2012 +0200
batman-adv: export compatibility version via debugfs
Different versions of the batman-adv module may use the same compatibility version, but this is not understandable at runtime (the only way is to parse the kernel log and fetch the batman-adv advertisement message on loading). The user may want to know whether two nodes using different versions can communicate or not. For this purpose the module has to export this value through debugfs.
Reported-by: Moritz Warning moritzwarning@web.de Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit dfb5f80c9db1b535524a2baec80bbfa6c69791e3 Author: Antonio Quartulli ordex@autistici.org Date: Tue Oct 16 10:04:39 2012 +0200
batman-adv: support array of debugfs general attributes
This patch adds support for an array of debugfs general (not soft_iface specific) attributes. With this change it will be possible to add more general attributes by simply appending them to the array without touching the rest of the code.
Reported-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Antonio Quartulli ordex@autistici.org Acked-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit aa01d1fa75b4b7a6aa30823b9fc44c44532dba21 Author: Antonio Quartulli ordex@autistici.org Date: Tue Oct 16 08:24:41 2012 +0200
batman-adv: remove bogus kernel-doc for batadv_vis_data_open()
This patch removes some bogus kernel-doc for batadv_vis_data_open() in debugfs.c
This was introduced with ("batman-adv: Distributed ARP Table - implement local storage")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 516b20dab54404a199963fca9ac43e152cd856a6 Author: Antonio Quartulli ordex@autistici.org Date: Tue Oct 16 08:16:10 2012 +0200
batman-adv: fix kernel-doc for batadv_dat_entry
In the batadv_dat_entry structure last_update was lonely and was missing its own kernel-doc. This patch adds it.
This was introduced with ("batman-adv: Distributed ARP Table - implement local storage")
Reported-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit e65e75c756d325d3b8a6af51d07cbed236c5ad96 Author: Antonio Quartulli ordex@autistici.org Date: Tue Oct 16 08:12:33 2012 +0200
batman-adv: fix ifdef for DAT in types.h
It is better to fully enclose the batadv_priv_dat struct in the #ifdef/endif block instead of the enclosing only the field which would not compile while DAT is off.
This was introduced with ("batman-adv: Distributed ARP Table - add compile option")
Reported-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 923d5d148cdd0928c9c5f8e0e2024f585dcf6efd Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Mon Oct 15 22:38:04 2012 +0200
batman-adv: fix bla compare function
The address and the VLAN VID may not be packed in the respective structs. Fix this by comparing the elements individually.
Reported-by: Marek Lindner lindner_marek@yahoo.de Reported-by: Sven Eckelmann sven@narfation.org Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit f64999e5d5c5b20af0f18f4ad304d3b6e2a420f2 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Mon Oct 15 22:38:03 2012 +0200
batman-adv: move hash_bytes into hash.h
This function will be used by other parts of batman-adv as well.
Reported-by: Marek Lindner lindner_marek@yahoo.de Reported-by: Sven Eckelmann sven@narfation.org Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 889a47999b8390ac1d6c0c7c07ff43118366e8d9 Merge: 7b390de ddffeb8 Author: Antonio Quartulli ordex@autistici.org Date: Mon Oct 15 09:34:13 2012 +0200
Merge tag 'v3.7-rc1' into merge/master
Linux 3.7-rc1
commit 7b390de223ace6aa4009a22cdac56e48bdab00af Author: Linus Lüssing linus.luessing@web.de Date: Tue Sep 18 03:01:08 2012 +0200
batman-adv: Fix symmetry check / route flapping in multi interface setups
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
Conflicts: net/batman-adv/bat_iv_ogm.c
commit fb3b8a32736aa6c19c58dc84677e838d1f1ca4c3 Author: Def def@laposte.net Date: Thu Sep 20 14:56:13 2012 +0200
batman-adv: Fix change mac address of soft iface.
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
commit dec7a30b71cfba8fb8323cc1ed8ea7a49daead50 Author: Linus Lüssing linus.luessing@web.de Date: Fri Sep 14 00:40:54 2012 +0000
batman-adv: make batadv_test_bit() return 0 or 1 only
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
commit d8179084adf5cf846c08d9f432246ca632994ca5 Merge: d7cc20f a6ad857 Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Oct 15 02:58:05 2012 +0800
Merge branch 'next'
Conflicts: compat.h
commit a6ad8574ea13f3463bae39324d093e6c31682cc8 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Sun Oct 14 14:46:57 2012 +0200
batman-adv: dirty hack to recompute mac_len in the rx path
It is possible that the mac_len is not properly exported because of strange device configuration (this behaviour has been observed when using batman-adv on top of a vlan interface). Therefore it is needed to explicitly recompute it at the very beginning of the rx path.
This is done by appending the recompute function to the skb_share_mac() function, hence the "dirty hack" in the subject. We expect this problem to be fixed in linux 3.8 and above.
Reported-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit d7cc20fc1442893fd60d00c4f4540aecb3f5ba01 Author: Antonio Quartulli ordex@autistici.org Date: Sun Oct 14 17:19:19 2012 +0200
batman-adv: enable fast client detection using unicast_4addr packets
The "early client detection mechanism" can be extended to find new clients by means of unicast_4addr packets.
The unicast_4addr packet contains as well as the broadcast packet (which is currently used in this mechanism) the address of the originating node and can therefore be used to install new entries in the Global Translation Table
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 2b105ca9d1ec396aa8bbdcc472d89fdc9563ca62 Author: Antonio Quartulli ordex@autistici.org Date: Tue Oct 9 15:00:11 2012 +0200
batman-adv: fix DAT packet counting
DAT packets must be counted before any batadv_dat_snoop_incoming_* invocation otherwise the counters may not be incremented at all
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 14212216617f1b00a248b472d8b7d0ea9ff8e2a8 Author: Sven Eckelmann sven@narfation.org Date: Sun Oct 7 13:34:15 2012 +0200
batman-adv: Mark best gateway in transtable_global debugfs
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
commit af5ec5cfdd2a09edf596da81f9b7b4003993f910 Author: Sven Eckelmann sven@narfation.org Date: Sun Oct 7 12:02:22 2012 +0200
batman-adv: Remove instant overwritten variable initialization
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit f0ac9442c1120aabfe2a5cc601939df10dc1d9a4 Author: Antonio Quartulli ordex@autistici.org Date: Sun Oct 7 09:05:36 2012 +0200
batman-adv: fix new line alignment
Introduced with ("batman-adv: Distributed ARP Table - create DHT helper functions")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit b996a44739b3340d9e651c556e434d2524ec145f Author: Martin Hundebøll martin@hundeboll.net Date: Fri Apr 20 17:02:45 2012 +0200
batman-adv: Add get_ethtool_stats() support for DAT
Added additional counters for D.A.T.
Signed-off-by: Martin Hundebøll martin@hundeboll.net Signed-off-by: Antonio Quartulli ordex@autistici.org
commit ad51ff1079aff697c986c65b66f4a7f154128ebc Author: Antonio Quartulli ordex@autistici.org Date: Wed Aug 8 18:50:57 2012 +0200
batman-adv: Distributed ARP Table - add runtime switch
This patch adds a runtime switch that enables the user to turn the DAT feature on or off at runtime
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 909377e800c837e890bf6560ddad4197009081f4 Author: Antonio Quartulli ordex@autistici.org Date: Sun Nov 6 12:23:55 2011 +0100
batman-adv: Distributed ARP Table - add compile option
This patch makes it possible to decide whether to include DAT within the batman-adv binary or not. It is extremely useful when the user wants to reduce the size of the resulting module by cutting off any not needed feature.
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 75ca71d858f5cbc0a533dda04663a575a202edc9 Author: Antonio Quartulli ordex@autistici.org Date: Sun Jun 26 03:37:18 2011 +0200
batman-adv: Distributed ARP Table - add snooping functions for ARP messages
In case of an ARP message going in or out the soft_iface, it is intercepted and a special action is performed. In particular the DHT helper functions previously implemented are used to store all the ARP entries belonging to the network in order to provide a fast and unicast lookup instead of the classic broadcast flooding mechanism. Each node stores the entries it is responsible for (following the DHT rules) in its soft_iface ARP table. This makes it possible to reuse the kernel data structures and functions for ARP management.
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 359c95b60efe80f14da52ed3cf681f5b0defb29d Author: Antonio Quartulli ordex@autistici.org Date: Thu Jun 2 12:29:51 2011 +0200
batman-adv: Distributed ARP Table - add ARP parsing functions
ARP messages are now parsed to make it possible to trigger special actions depending on their types (snooping).
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit f6badf9eb582c3b9f3e4eb8550a82efeb7f39a5f Author: Antonio Quartulli ordex@autistici.org Date: Sat Jun 30 20:01:19 2012 +0200
batman-adv: Distributed ARP Table - implement local storage
Since batman-adv cannot inter-operate with the host ARP table, this patch introduces a batman-adv private storage for ARP entries exchanged within DAT. This storage will represent the node local cache in the DAT protocol.
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 34b3c3850e7dd6e787a56232a34006388abb2dc6 Author: Antonio Quartulli ordex@autistici.org Date: Wed Nov 23 11:35:44 2011 +0100
batman-adv: Distributed ARP Table - create DHT helper functions
Add all the relevant functions in order to manage a Distributed Hash Table over the B.A.T.M.A.N.-adv network. It will later be used to store several ARP entries and implement DAT (Distributed ARP Table)
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 55c4167e769a89831243a5f7dc706958a93f3c78 Author: Antonio Quartulli ordex@autistici.org Date: Mon Oct 1 09:57:36 2012 +0200
batman-adv: Distributed ARP Table - add a new debug log level
A new log level has been added to concentrate messages regarding DAT: ARP snooping, requests, response and DHT related messages. The new log level is named BATADV_DBG_DAT
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 78fc6bbe0aca868b65b92723b1e259e7ef7b35c0 Author: Antonio Quartulli ordex@autistici.org Date: Mon Oct 1 09:57:35 2012 +0200
batman-adv: add UNICAST_4ADDR packet type
The current unicast packet type does not contain the orig source address. This patches add a new unicast packet (called UNICAST_4ADDR) which provides two new fields: the originator source address and the subtype (the type of the data contained in the packet payload). The former is useful to identify the node which injected the packet into the network and the latter is useful to avoid creating new unicast packet types in the future: a macro defining a new subtype will be enough.
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 2443ba383c7d2b1090b84c75c8d0a61aacc616c9 Author: Antonio Quartulli ordex@autistici.org Date: Sun Sep 23 22:38:37 2012 +0200
batman-adv: roaming handling mechanism redesign
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
commit d4ad929f2bf06080430b08878c2700968690ca59 Author: Antonio Quartulli ordex@autistici.org Date: Sun Sep 23 22:38:36 2012 +0200
batman-adv: refactor tt_global_del_struct()
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
commit a0055f85e0d0512b1652624c8536791c200bbd94 Author: Antonio Quartulli ordex@autistici.org Date: Sun Sep 23 22:38:35 2012 +0200
batman-adv: refactor code to simplify long lines
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 3fbd7ac8c71b3778c5751b3d096ea36f96ef534e Author: Antonio Quartulli ordex@autistici.org Date: Sun Sep 23 22:38:34 2012 +0200
batman-adv: substitute tt_poss_change with a per-tt_entry flag
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
commit a915748361c560142cf3986b49e02fdc16415135 Merge: bf02ad89 efc1b3a Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Sep 23 23:16:17 2012 +0800
Merge branch 'next'
commit efc1b3a90900749e03d17d8a14527b3758afd976 Merge: 3b1bf5a 6c9d9ee Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Sep 23 23:15:15 2012 +0800
Merge branch 'maint' into next
Conflicts: bat_iv_ogm.c
commit 6c9d9eeac0fb5d6625256cd119d0a4994c63e965 Author: Linus Lüssing linus.luessing@web.de Date: Tue Sep 18 03:01:08 2012 +0200
batman-adv: Fix symmetry check / route flapping in multi interface setups
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
commit bf02ad89f85f8cb5a8b76bff05566a921ad7d19e Merge: bafd3f4 3b1bf5a Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Sep 23 17:28:43 2012 +0800
Merge branch 'next'
commit 3b1bf5a6359c869a3337be721c17960b964280d7 Merge: 5c4608f 86fa71a Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Sep 23 17:27:22 2012 +0800
Merge branch 'maint' into next
commit 86fa71a4985f60da5918e1f43136dae77852cdc3 Author: Def def@laposte.net Date: Thu Sep 20 14:56:13 2012 +0200
batman-adv: Fix change mac address of soft iface.
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
commit bafd3f4f99d2b0b205a1b4cf193ee8ad151c710e Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Thu Sep 13 18:18:46 2012 +0200
batman-adv: wait multiple periods before activating bla
For some reasons (bridge forward delay, network device setup order, etc) the initial bridge loop avoidance announcement packets may be lost. This may lead to problems in finding other backbone gws, and therfore create loops in the startup time.
Fix this by extending the waiting periods to 3 (define can be changed) before allowing broadcast traffic.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit e344097b219b09ed1d70f4e47164bba7998cc5a6 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Sun Sep 9 22:27:57 2012 +0200
batman-adv: allow bla traffic only after first worker period
When adding a backbone gateway for the first time, it might not yet be known in the backbone, and therefore we should not forward broadcasts yet. This behaviour is the same as when sending a request to another backbone gw because of a CRC mismatch. The backbone gw will operate normal after the next periodic bla work.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 5c280951b31f8ba8aab64ea5781d28de68c4bb70 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Sat Sep 8 18:02:53 2012 +0200
batman-adv: send announcement when backbone gw is registered
To avoid loops in the startup phase until the first announcement is sent, send an announcement immediately as soon as a backbone gw is added.
This may happen due to various reasons, e.g. a packet passes the rx or tx path.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 3d48811b27f5d5f3b209b0b7856d4cb3439dadfc Author: Antonio Quartulli ordex@autistici.org Date: Sun Sep 9 10:46:46 2012 +0200
batman-adv: prevent using any virtual device created on batman-adv as hard-interface
Any virtual device created on top of a batman-adv mesh interface must be prevented to be used to create a new mesh network (this would lead to an unwanted batman-over-batman configuration)
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 19dc74f0f1ffe162c5d4b52197b8b0f962c1df1c Merge: 85f416e 5c4608f Author: Sven Eckelmann sven@narfation.org Date: Sun Sep 9 11:30:15 2012 +0200
Merge branch 'next'
commit 5c4608f46bcbd42544fec34e7541394a741dcdc1 Merge: 28d246e 716c8c9 Author: Sven Eckelmann sven@narfation.org Date: Sun Sep 9 11:29:31 2012 +0200
Merge branch 'maint' into next
commit 716c8c9a8bb7ac1e30e959e50ed74caa7dabe60a Author: Linus Lüssing linus.luessing@web.de Date: Mon Sep 3 22:20:31 2012 +0200
batman-adv: make batadv_test_bit() return 0 or 1 only
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
commit 85f416edfb289ddf1cf4f896f391228aaded2a9a Author: Antonio Quartulli ordex@autistici.org Date: Sun Sep 2 19:00:38 2012 +0200
batman-adv: fix wrong spinlock inline comment
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 7e15c9305ce0c3cdc806dfef2a2183ad447304a2 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Thu Aug 30 18:22:27 2012 +0200
batman-adv: don't rely on positions in struct for hashing
The hash functions in the bridge loop avoidance code expects the VLAN vid to be right after the mac address, but this is not guaranteed.
Fix this by explicitly hashing over the right fields of the struct.
Reported-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 5db427c5d73170e2f76461bb6dada913d69e4329 Author: Sven Eckelmann sven@narfation.org Date: Mon Aug 27 10:53:51 2012 +0200
batman-adv: Add KernelDoc for soft-interface lockdep functions
e27bb6fa916451e9eaced16e7c21d5b71a3b7f30 ("batman-adv: Set special lockdep classes to avoid lockdep warning") added new functions, but no new documentation for these functions.
Signed-off-by: Sven Eckelmann sven@narfation.org
commit b8f86c91faeb816168ecbdac0a355f316781ba77 Author: Sven Eckelmann sven@narfation.org Date: Mon Aug 27 10:53:50 2012 +0200
batman-adv: Write lockdep xmit class in late initialization phase
e27bb6fa916451e9eaced16e7c21d5b71a3b7f30 ("batman-adv: Set special lockdep classes to avoid lockdep warning") introduced a lockdep class for the tx queue, but did not set it in the correct initialization phase. The batman-adv specific lock class could be replaced by a later netdevice registration phase.
Reported-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Sven Eckelmann sven@narfation.org
commit 32d59e468017d478aa0bb6b37df8b347ba0e90b1 Author: Antonio Quartulli ordex@autistici.org Date: Mon Aug 27 11:45:37 2012 +0200
batman-adv: add kernel-doc for enum batadv_dbg_level
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 0ac014725d04fd1c38de479fddc6fe425daebeb7 Author: Antonio Quartulli ordex@autistici.org Date: Mon Aug 27 11:44:43 2012 +0200
batman-adv: pass the WIFI flag from the local to global entry
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
commit ccf0eec672598a613a18bb4cdadfde4a1ac539c5 Author: Antonio Quartulli ordex@autistici.org Date: Mon Aug 27 09:35:54 2012 +0200
batman-adv: properly convert flag into a boolean value
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
commit 94494a10f95e00d4e1f7da0f8b1e45904ec165eb Author: Antonio Quartulli ordex@autistici.org Date: Sun Aug 26 23:25:59 2012 +0200
batman-adv: check for more space before accessing the skb
In batadv_check_unicast_ttvn() the code accesses both the unicast header and the Ethernet header in the payload. For this reason pskb_may_pull() must be invoked to check for the required space.
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 3632c33d98f5dfddd33fc3480053911a659fcbf4 Author: Antonio Quartulli ordex@autistici.org Date: Sun Aug 26 01:05:56 2012 +0200
batman-adv: print packets re-routing on DBG_TT and ratelimit it
To simplify TranslationTable debugging it is better to print the packet rerouting message on the DBG_TT log level. In this way a developer interested in packets rerouting doesn't need to filter it out of the whole ROUTES log.
Moreover, since this message will appear for each rerouted message, it is now "ratelimited".
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 700ae88b21b66dc666c9337e73b2be5e7478d84c Author: Antonio Quartulli ordex@autistici.org Date: Fri Aug 24 17:54:07 2012 +0200
batman-adv: properly store the roaming time
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
commit 05d0f6dc27c21b5b781db2a8706ed3c5b704f763 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Sun Aug 19 20:10:09 2012 +0200
batman-adv: don't allow ECTP traffic on batman-adv
We have seen this to break networks when used with bridge loop avoidance. As we can't see any benefit from sending these ancient frames via our mesh, we just drop them.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 9e4776ea8507934e841281462385bb745f68d2ad Merge: 534f242 28d246e Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Aug 25 01:15:35 2012 +0200
Merge branch 'next'
commit 28d246e324fe753e24adb93b7f843cbd5d5fcb1e Author: Antonio Quartulli ordex@autistici.org Date: Wed Aug 22 00:40:05 2012 +0200
batman-adv: swap lines to get in sync with networking branch
due to a merge conflict resolution handled differently in the networking branch, we now have a small divergence between our next branch and what we already have in net/batman-adv/ in the kernel. Since we cannot ask the kernel guys to "swap two lines", with this patch we fix the problem in our repo
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 534f242fe91911f6673633f018822bb747a1cf98 Author: Sven Eckelmann sven@narfation.org Date: Mon Aug 20 10:26:49 2012 +0200
batman-adv: Only increase refcounter once for alternate router
The test whether we can use a router for alternating bonding should only be done once because it is already known that it is still usable and will not be deleted from the list soon.
This patch addresses Coverity #712285: Unchecked return value
Signed-off-by: Sven Eckelmann sven@narfation.org
commit 2e66c5ee589f2723f8b609084b9f29199dc80e31 Author: Sven Eckelmann sven@narfation.org Date: Mon Aug 20 23:37:26 2012 +0200
batman-adv: Check return value of try_module_get
New operations should not be started when they need an increased module reference counter and try_module_get failed.
This patch addresses Coverity #712284: Unchecked return value
Signed-off-by: Sven Eckelmann sven@narfation.org
commit d2da57c9794662d2d1607c2142def652add65c55 Author: Sven Eckelmann sven@narfation.org Date: Mon Aug 20 10:26:47 2012 +0200
batman-adv: Remove extra check in batadv_bit_get_packet
batadv_bit_get_packet checks for all common situations before it decides that the new received packet indicates that the host was restarted. This extra condition check at the end of the function is not necessary because this condition is always true.
This patch addresses Coverity #712296: Logically dead code
Signed-off-by: Sven Eckelmann sven@narfation.org
commit e27bb6fa916451e9eaced16e7c21d5b71a3b7f30 Author: Sven Eckelmann sven@narfation.org Date: Mon Aug 20 09:03:59 2012 +0200
batman-adv: Set special lockdep classes to avoid lockdep warning
Transmissions over batman-adv devices always start another nested transmission over devices attached to the batman-adv interface. These devices usually use the ethernet lockdep class for the tx_queue lock which is also set by default for all batman-adv devices. Lockdep will detect a nested locking attempt of two locks with the same class and warn about a possible deadlock.
This is the default and expected behavior and should not alarm the locking correctness prove mechanism. Therefore, the locks for all netdevice specific tx queues get a special batman-adv lock class to avoid a false positive for each transmission.
Reported-by: Linus Luessing linus.luessing@web.de Signed-off-by: Sven Eckelmann sven@narfation.org
commit 956c0b8919605a1816b46bfdfb912c049697bdc9 Author: Antonio Quartulli ordex@autistici.org Date: Sat Aug 11 11:11:00 2012 +0200
batman-adv: return proper value in case of hash_add failure
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
commit 336d9451abdacb8b8dc54d6f291e7cf61e38c94d Author: Martin Hundebøll martin@hundeboll.net Date: Fri Aug 10 15:46:32 2012 +0200
batman-adv: Remove unused hlist macros in compat.h
Signed-off-by: Martin Hundebøll martin@hundeboll.net Acked-by: Sven Eckelmann sven@narfation.org
commit 65393384395ef81bcb8c0fb9c43f182c177bfe3e Author: Marek Lindner lindner_marek@yahoo.de Date: Fri Aug 3 17:15:46 2012 +0200
batman-adv: consolidate duplicated primary_if checking code
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit afffd55f98ffeb4bb6cb0a7d58a6e0928dd9bac5 Author: Marek Lindner lindner_marek@yahoo.de Date: Sun Aug 5 18:10:45 2012 +0200
batman-adv: separate BATADV_ATTR_HIF_UINT sysfs name from hard-iface variable
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit d174d14fdedd70921a71f86896e56d5ddf5de822 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Aug 2 17:20:26 2012 +0200
batman-adv: split hard_iface struct for each routing protocol
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit 2ce4b9b7ec82e8158eb115a4e8973862480999f5 Author: Antonio Quartulli ordex@autistici.org Date: Tue Jul 31 17:19:15 2012 +0200
batman-adv: use check_unicast_packet() in recv_roam_adv()
To avoid code duplication and to simplify further changes, check_unicast_packet() is now used in recv_roam_adv() to check for not well formed packets and so discard them.
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 6fd9fab17dcf6b636e0a005d21edb2135d8c3b20 Author: Antonio Quartulli ordex@autistici.org Date: Wed Aug 22 00:42:40 2012 +0200
batman-adv: move function arguments on one line
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit 79ce8b58aff393d904dbbcc0e3059135e2efca40 Merge: 209f023 11d07ba Author: Antonio Quartulli ordex@autistici.org Date: Wed Aug 22 00:21:53 2012 +0200
Merge remote-tracking branch 'pkg/next' into merge/master
Conflicts: net/batman-adv/CHANGELOG net/batman-adv/README net/batman-adv/README.external net/batman-adv/bridge_loop_avoidance.h
commit 11d07bad4b5bd703d6b60ef088877fa782a2dc69 Author: Sven Eckelmann sven@narfation.org Date: Sun Aug 19 21:48:25 2012 +0200
batman-adv: Start new development cycle
Signed-off-by: Sven Eckelmann sven@narfation.org
commit fafa0c864331e0818841f686c9d6d5329625390d Merge: 81a80f2 de07410 Author: Sven Eckelmann sven@narfation.org Date: Sun Aug 19 21:47:26 2012 +0200
Merge tag 'v2012.3.0'
batman-adv 2012.3.0
commit de074104ed315057404e2829f548715102c13aa7 Author: Sven Eckelmann sven@narfation.org Date: Sun Aug 19 21:30:27 2012 +0200
batman-adv: Update CHANGELOG for upcoming release
Signed-off-by: Sven Eckelmann sven@narfation.org
commit 66dbd3925bac37120a1e903b759b1401d8187784 Author: Sven Eckelmann sven@narfation.org Date: Sun Aug 19 21:26:00 2012 +0200
batman-adv: Update compatible kernel version number
Signed-off-by: Sven Eckelmann sven@narfation.org
commit 81a80f27827d13d7fd459aaa9954a8bd45d12622 Merge: 3fdeaa6 45fdde3 Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Aug 9 11:10:08 2012 +0200
Merge branch 'next'
commit 45fdde36787aafe0a9720106eb5ad6b35f46988e Author: Jesper Juhl jj@chaosbits.net Date: Tue Aug 7 20:32:34 2012 +0200
batman-adv: Fix mem leak in the batadv_tt_local_event() function
Memory is allocated for 'tt_change_node' with kmalloc(). 'tt_change_node' may go out of scope without 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
commit 3fdeaa6bfb404311b73a689e984672161403a0c2 Merge: 8b9262f 8c379dc Author: Marek Lindner lindner_marek@yahoo.de Date: Thu Jul 26 14:48:11 2012 +0200
Merge branch 'next'
Conflicts: gateway_client.c
commit 8c379dc6552f57a56f9d1d02e8b45e167933a55c Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Jul 23 14:59:13 2012 +0200
batman-adv: select an internet gateway if none was chosen
This is a regression introduced by: 6a17ecc4603be7f065c38b288d038a0082bbf21d
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
commit 8b9262fd7c154810157567d358bd8dca582da42f Author: Sven Eckelmann sven@narfation.org Date: Wed Jul 18 09:07:07 2012 +0200
batman-adv: Fix wrong multiline comment ending
This regression was introduced in 724d05c8215e4e8186097121595ef20b6ba601b7
Signed-off-by: Sven Eckelmann sven@narfation.org
commit 22b03ea1cefbdcc4a0cf123da6feb3bd18dd2f8a Merge: 9cbc67d 7bce341 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Jul 17 12:49:56 2012 +0200
Merge branch 'next'
commit 7bce3414ef28fa2638e69b4a6b7b1cbddfd9d13f Author: Ben Hutchings bhutchings@solarflare.com Date: Fri Jul 13 10:13:52 2012 +0200
batman-adv: Fix (nearly-)kernel-doc comments for various functions
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 Signed-off-by: Sven Eckelmann sven@narfation.org
commit 9cbc67d9da477a4a483370fe9d53b1d4fd5ffadd Author: Antonio Quartulli ordex@autistici.org Date: Thu Jul 5 23:38:30 2012 +0200
batman-adv: change interface_rx to get orig node
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
commit 724d05c8215e4e8186097121595ef20b6ba601b7 Author: Antonio Quartulli ordex@autistici.org Date: Thu Jul 5 23:38:29 2012 +0200
batman-adv: detect not yet announced clients
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
commit 41d38491fa8e4bc1312466d1544e7a3f5dbed9ec Author: Sven Eckelmann sven@narfation.org Date: Sun Jul 8 18:33:51 2012 +0200
batman-adv: Reduce accumulated length of simple statements
Signed-off-by: Sven Eckelmann sven@narfation.org
commit aae667885a299daa24a0a527600c339d15198705 Author: Sven Eckelmann sven@narfation.org Date: Sun Jul 8 17:13:15 2012 +0200
batman-adv: Don't break statements after assignment operator
Signed-off-by: Sven Eckelmann sven@narfation.org
commit 95157d39c018c8efb9eb36cdc5f1d42c9f16c271 Author: Sven Eckelmann sven@narfation.org Date: Sun Jul 8 16:32:09 2012 +0200
batman-adv: Use BIT(x) macro to calculate bit positions
Signed-off-by: Sven Eckelmann sven@narfation.org
commit 2b7b639b23604d2c59d2327ed3a105198ea17935 Author: Martin Hundebøll martin@hundeboll.net Date: Thu Jul 5 11:34:28 2012 +0200
batman-adv: Drop tt queries with foreign dest
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
commit 9353d58fe7fd72ed7aa83feef8684fd0133b7fe9 Author: Martin Hundebøll martin@hundeboll.net Date: Thu Jul 5 11:34:27 2012 +0200
batman-adv: Move batadv_check_unicast_packet()
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
commit fa49b579c8daa6495c0fe200dfa9cd14cdf2dd46 Author: Sven Eckelmann sven@narfation.org Date: Sun Jul 15 22:26:51 2012 +0200
batman-adv: Split batadv_priv in sub-structures for features
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
commit 2ca49f74f4ec112db2f55c3d67dc645c0de832f3 Merge: c4499bb d6517f1 Author: Marek Lindner lindner_marek@yahoo.de Date: Fri Jul 6 00:13:47 2012 +0200
Merge branch 'next'
commit d6517f145fc41cf169d7bd95d8782659190100c0 Merge: 4aae804 e324701 Author: Marek Lindner lindner_marek@yahoo.de Date: Fri Jul 6 00:13:12 2012 +0200
Merge branch 'maint' into next
Conflicts: bridge_loop_avoidance.c bridge_loop_avoidance.h soft-interface.c
commit e32470167379db2ca7713108f1e917c531426eee Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Wed Jul 4 20:38:19 2012 +0200
batman-adv: check incoming packet type for bla
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
commit c4499bbb6f0ff5dea76a409ca30815bef4005be3 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Sun Jul 1 22:51:55 2012 +0200
batman-adv: check batadv_orig_hash_add_if() return code
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
commit 60b0fb75df6924e748c9c2910e5d3d17d0f3c502 Author: Antonio Quartulli ordex@autistici.org Date: Sun Jul 1 19:07:31 2012 +0200
batman-adv: fix typos in comments
the word millisecond is misspelled in several comments. This patch fixes it.
Signed-off-by: Antonio Quartulli ordex@autistici.org
commit c5eb5bb30321c47d15bd62c0ac83ed2e83150be5 Author: Antonio Quartulli ordex@autistici.org Date: Sun Jul 1 14:09:12 2012 +0200
batman-adv: add reference counting for type batadv_tt_orig_list_entry
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
commit 130b9bebcbb6909f16a7152724e89db219f85abd Author: Jonathan Corbet corbet@lwn.net Date: Sat Jun 30 10:49:13 2012 -0600
batman-adv: remove a misleading comment
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
commit 5deb69f60f388055982a1da6dce876049f86841d Merge: 620f45d 4aae804 Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Jun 30 14:21:44 2012 +0200
Merge branch 'next'
commit 620f45d57203dcc722534b034157fec55df2a606 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Jun 26 12:00:34 2012 +0200
batman-adv: fix multiline comment complaint
Regression introduced with: a81d0f914409c04cbefafb8b4ccf2de4cc50458f
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
commit a81d0f914409c04cbefafb8b4ccf2de4cc50458f Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Jun 23 11:47:53 2012 +0200
batman-adv: convert remaining packet counters to per_cpu_ptr() infrastructure
Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Martin Hundebøll martin@hundeboll.net
commit e59c597a4dff8c239e2c89ea29802ba985caccd9 Merge: f9bb019 ce3dbe0 Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Jun 25 16:35:47 2012 +0200
Merge branch 'next'
commit f9bb01916485ee9ba485acaf9424f21f1b42b537 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Sat Jun 23 12:34:18 2012 +0200
batman-adv: rename bridge loop avoidance claim types
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
commit 4c66b7d492b5f5d2931818ba7bdeb0d415b87b3a Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Sat Jun 23 12:34:17 2012 +0200
batman-adv: correct comments in bridge loop avoidance
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
commit 392159b48053701a6aaba5c1fad1f60a4481ae8c Merge: a4eded7 f80413a Author: Marek Lindner lindner_marek@yahoo.de Date: Fri Jun 22 21:11:22 2012 +0200
Merge branch 'next'
commit a4eded7ad2b1d5da0ca60af004a611a209988c75 Merge: 500ab9a d03cfc8 Author: Marek Lindner lindner_marek@yahoo.de Date: Fri Jun 22 21:06:26 2012 +0200
Merge branch 'next'
commit 500ab9a253d8258aa0a27c059cc6609528aa73a9 Author: Simon Wunderlich simon.wunderlich@s2003.tu-chemnitz.de Date: Mon Jun 18 18:39:26 2012 +0200
batman-adv: Add the backbone gateway list to debugfs
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
-----------------------------------------------------------------------