- 28 2月, 2012 1 次提交
-
-
由 Sven Eckelmann 提交于
Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
- 17 2月, 2012 17 次提交
-
-
由 Sven Eckelmann 提交于
Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Antonio Quartulli 提交于
Actually the TT_CLIENT_PENDING flag is never set in the tt_global_entry structure, therefore this code is useless and can be removed. Reported-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Antonio Quartulli 提交于
Each tt_local_set_pending is always followed by a bat_dbg invocation. This can be simplified by moving the bat_dbg() call. Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Antonio Quartulli 提交于
In case of a new tt_local_entry, the TT_CLIENT_NEW flag has to be set before adding such entry to the hash table. Otherwise, it opens a race condition in which the entry can be found but the flag has not been set. Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Sven Eckelmann 提交于
Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Sven Eckelmann 提交于
Signed-off-by: NSven Eckelmann <sven@narfation.org> Acked-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Marek Lindner 提交于
To increase readability the has_timed_out() functions has been introduced. This patch converts existing time_after() calls to use this wrapper function (if applicable). This patch also converts all timeouts to miliseconds to be consistent. Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de> Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
-
由 Marek Lindner 提交于
Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Marek Lindner 提交于
Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Marek Lindner 提交于
Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Marek Lindner 提交于
Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Marek Lindner 提交于
Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Martin Hundebøll 提交于
Both translation tables and network coding use timeouts to do house keeping, so we might as well share the function used to compare a timestamp+timeout with current time. For readability and simplicity, the function is renamed to has_timed_out() and uses time_is_before_jiffies() instead of time_after(). Signed-off-by: NMartin Hundebøll <martin@hundeboll.net> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Martin Hundebøll 提交于
Signed-off-by: NMartin Hundebøll <martin@hundeboll.net> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Marek Lindner 提交于
Most of the values in that call are derived from the skb, so we can hand over the skb instead. Reported-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Sven Eckelmann 提交于
All batman-adv packets have a common 3 byte header. It can be used to share some code between different code paths, but it was never explicit stated that this header has to be always the same for all packets. Therefore, new code changes always have the problem that they may accidently introduce regressions by moving some elements around. A new structure is introduced that contains the common header and makes it easier visible that these 3 bytes have to be the same for all on-wire packets. Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Antonio Quartulli 提交于
(ttvn == 0) is currently used as initial condition. However this is not a good idea because ttvn gets the vale zero each time after reaching the maximum value (wrap around). For this reason a new flag is added in order to define whether a node has an initialised table or not. Moreover, after invoking tt_global_del_orig(), tt_initialised has to be set to false Reported-by: NAlexey Fisher <bug-track@fisher-privat.net> Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de> Tested-by: NAlexey Fisher <bug-track@fisher-privat.net> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
- 17 12月, 2011 1 次提交
-
-
由 David S. Miller 提交于
I didn't resolve the merge properly during the last pull of the net tree into net-next. The code in the final resolution should set flags to TT_CLIENT_ROAM not TT_CLIENT_PENDING. Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 12 12月, 2011 3 次提交
-
-
由 Sven Eckelmann 提交于
Don't write more than the requested number of bytes of an batman-adv icmp packet to the userspace buffer. Otherwise unrelated userspace memory might get overridden by the kernel. Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Sven Eckelmann 提交于
The access_ok read check can be directly done in copy_from_user since a failure of access_ok is handled the same way as an error in __copy_from_user. Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Paul Kot 提交于
Writing a icmp_packet_rr and then reading icmp_packet can lead to kernel memory corruption, if __user *buf is just below TASK_SIZE. Signed-off-by: NPaul Kot <pawlkt@gmail.com> [sven@narfation.org: made it checkpatch clean] Signed-off-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
- 07 12月, 2011 4 次提交
-
-
由 Antonio Quartulli 提交于
When receiving a DEL change for a client due to a roaming event (change is marked with TT_CLIENT_ROAM), each node has to check if the client roamed to itself or somewhere else. In the latter case the global entry is kept to avoid having no route at all otherwise we can safely delete the global entry Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
-
由 Antonio Quartulli 提交于
In case of a client roaming from node A to node B, the latter have to mark the corresponding global entry with TT_CLIENT_ROAM (instead of TT_CLIENT_PENDING). Marking a global entry with TT_CLIENT_PENDING will end up in keeping such entry forever (because this flag is only meant to be used with local entries and it is never checked on global ones). In the worst case (all the clients roaming to the same node A) the local and the global table will contain exactly the same clients. Batman-adv will continue to work, but the memory usage is duplicated. Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
-
由 Antonio Quartulli 提交于
in an multi-line if statement leading edges should line up to the opening parenthesis Reported-by: NDavid Miller <davem@davemloft.net> Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
由 Dan Carpenter 提交于
There is a typo here where an extra '!' made the check to the opposite of what was intended. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
-
- 20 11月, 2011 14 次提交
-
-
由 Simon Wunderlich 提交于
When entering softif_create(), the rtnl lock has already been acquired by store_mesh_iface(). (store_mesh_iface() -> hardif_enable_interface() -> softif_create) In case of an error, we should therefore call unregister_netdevice() instead of unregister_netdev(). unregister_netdev() tries to acquire the rtnl lock itself and deadlocks in this situation. unregister_netdevice() assumes that the rtnl lock is already been held. Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Simon Wunderlich 提交于
if hash_add() fails, we should remove the structure to avoid memory leaks. Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de> Acked-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Antonio Quartulli 提交于
The tt_local_reset_flags() is actually used for one use case only. It is not generalised enough to be used indifferent situations. This patch make it general enough in order to let other code use it whenever a flag set is requested over the whole hash table (passed as parameter). The function is now called tt_set_flags() Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Simon Wunderlich 提交于
The check for new packets in the future used a wrong binary operator, which makes the check expression always true and accepting too many packets. Reported-by: NThomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Antonio Quartulli 提交于
Several functions in the translation table management code assume that the tt_global_entry and tt_local_entry structures have the same initial fields such as 'addr' and 'hash_entry'. To improve the code readability and to avoid mistakes in later changes, a common substructure that substitute the shared fields has been introduced (struct tt_common_entry). Thanks to this modification, it has also been possible to slightly reduce the code length by merging some functions like compare_ltt/gtt() and tt_local/global_hash_find() Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Marek Lindner 提交于
Reported-by: NSven Eckelmann <sven@narfation.org> Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Antonio Quartulli 提交于
Before accessing the TT_RESPONSE packet payload, the node has to ensure that the packet is long enough as it would expect to be. Reported-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Antonio Quartulli 提交于
The TT_RESPONSE skb has to be linearised only if the node plans to access the packet payload (so only if the message is directed to that node). In all the other cases the node can avoid this memory operation Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Simon Wunderlich 提交于
When the translation tables (global and local) are written for debugfs, it is not neccesary to allocate a buffer, we can directly use seq_printf() to print them out. This might actually be safer if the table changes between size calculation and traversal, and we can't estimate the required size wrong. Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Antonio Quartulli 提交于
There are two reasons for this fix: - the result of choose_orig() and vis_choose() is an index and therefore it can't be negative. Hence it is correct to make the return type unsigned too. - sizeof(int) may not be the same on ALL the architectures. Since we plan to use choose_orig() as DHT hash function, we need to guarantee that, given the same argument, the result is the same. Then it is correct to explicitly express the size of the return type (and the second argument). Since the expected length is currently 4, uint32_t is the most convenient choice. Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Antonio Quartulli 提交于
get_orig_node() tries to retrieve an orig_node object based on a mac address and creates it if not present. This is not the wanted behaviour in the translation table code as we don't want to create new orig_code objects but expect a NULL pointer if the object does not exist. Reported-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Marek Lindner 提交于
Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de> Acked-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Sven Eckelmann 提交于
strict_strto<foo> is obsolete since v3.1-rc8-8466-g14acc55 and should be replaced with kstrto<foo>. Signed-off-by: NSven Eckelmann <sven@narfation.org>
-
由 Antonio Quartulli 提交于
When deleting the entries, tt_global_del_orig() has to print the message passed as argument instead of a static one. Signed-off-by: NAntonio Quartulli <ordex@autistici.org> Signed-off-by: NSven Eckelmann <sven@narfation.org>
-