The tag, GregKH-20100904 has been updated
to b4fb4917c35c29b183bee3f60c55156200f091a0 (commit)
from a24f6612aba0bd608e7399c6bca18bd434f8f1a3
- Shortlog ------------------------------------------------------------
commit b4fb4917c35c29b183bee3f60c55156200f091a0
Author: Sven Eckelmann <sven.eckelmann(a)gmx.de>
Date: Sat Sep 4 18:25:43 2010 +0200
batman-adv: Add missing include for bat_sys.h
soft_interface.c needs sysfs_add_meshif and sysfs_del_meshif after
"batman-adv: attach each hard-interface to a soft-interface". This
Include is provided indirectly using compat.h on standalone sources, but
missing on kernel builds.
We should add it directly as the compat.h include is only a side effect
we cannot rely on.
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
-----------------------------------------------------------------------
--
linux integration
The tag, GregKH-20100904 has been created
at a24f6612aba0bd608e7399c6bca18bd434f8f1a3 (commit)
- Shortlog ------------------------------------------------------------
commit a24f6612aba0bd608e7399c6bca18bd434f8f1a3
Merge: 2aa1367 6b0d828
Author: Sven Eckelmann <sven.eckelmann(a)gmx.de>
Date: Sat Sep 4 16:20:01 2010 +0200
Merge remote branch 'origin/next' into linux
Conflicts:
drivers/staging/batman-adv/CHANGELOG
drivers/staging/batman-adv/Makefile.kbuild
drivers/staging/batman-adv/README
drivers/staging/batman-adv/compat.h
drivers/staging/batman-adv/routing.c
drivers/staging/batman-adv/send.c
drivers/staging/batman-adv/soft-interface.c
-----------------------------------------------------------------------
--
linux integration
Author: simon
Date: 2010-09-04 14:42:28 +0200 (Sat, 04 Sep 2010)
New Revision: 1784
Modified:
trunk/batman-adv/CHANGELOG
trunk/batman-adv/README
Log:
batman-adv: Merge batman-adv 2010.1.0
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
Modified: trunk/batman-adv/CHANGELOG
===================================================================
--- trunk/batman-adv/CHANGELOG 2010-09-04 12:07:10 UTC (rev 1783)
+++ trunk/batman-adv/CHANGELOG 2010-09-04 12:42:28 UTC (rev 1784)
@@ -1,3 +1,19 @@
+batman-adv 2010.1.0:
+
+* support latest kernels (2.6.21 - 2.6.36)
+* further cleanup of coding style
+* recording of routes for batman icmp messages
+* move of complex sysfs files to debugfs
+* change output of all sysfs files to single-value-only
+* reintroduce virtual file for the debug log
+* bonding and alternating added
+* add ttl to broadcasts
+* change all sequence numbers to 32 bit
+* show last-seen in originator table
+* many bugs (rounding issues, locking, netdev event handler, ...) squashed
+
+ -- Sat, 04 Sep 2010 13:56:38 +0200
+
batman-adv 2010.0.0:
* support latest kernels (2.6.21 - 2.6.35)
Modified: trunk/batman-adv/README
===================================================================
--- trunk/batman-adv/README 2010-09-04 12:07:10 UTC (rev 1783)
+++ trunk/batman-adv/README 2010-09-04 12:42:28 UTC (rev 1784)
@@ -1,4 +1,4 @@
-[state: 12-06-2010]
+[state: 04-09-2010]
BATMAN-ADV
----------
@@ -18,7 +18,7 @@
duce the overhead to a minimum. It does not depend on any (other)
network driver, and can be used on wifi as well as ethernet lan,
vpn, etc ... (anything with ethernet-style layer 2). It compiles
-against and should work with Linux 2.6.21 - 2.6.35. Supporting
+against and should work with Linux 2.6.21 - 2.6.36. Supporting
older versions is not planned, but it's probably easy to backport
it. If you work on a backport, feel free to contact us. :-)
@@ -83,15 +83,21 @@
folder:
# ls /sys/class/net/bat0/mesh/
-# aggregate_ogm originators transtable_global vis_mode
-# orig_interval transtable_local vis_data
+# aggregated_ogms bonding orig_interval vis_mode
+There is a special folder for debugging informations:
+
+# ls /sys/kernel/debug/batman_adv/bat0/
+# originators socket transtable_global transtable_local
+# vis_data
+
+
Some of the files contain all sort of status information regard-
ing the mesh network. For example, you can view the table of
originators (mesh participants) with:
-# cat /sys/class/net/bat0/mesh/originators
+# cat /sys/kernel/debug/batman_adv/bat0/originators
Other files allow to change batman's behaviour to better fit your
requirements. For instance, you can check the current originator
@@ -99,7 +105,7 @@
sends its broadcast packets):
# cat /sys/class/net/bat0/mesh/orig_interval
-# status: 1000
+# 1000
and also change its value:
@@ -153,7 +159,7 @@
When configured as server, you can get a topology snapshot of
your mesh:
-# cat /sys/class/net/bat0/mesh/vis_data
+# cat /sys/kernel/debug/batman_adv/bat0/vis_data
This raw output is intended to be easily parsable and convertable
with other tools. Have a look at the batctl README if you want a
@@ -201,34 +207,27 @@
#EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG
+Those additional debug messages can be accessed using a special
+file in debugfs
+
+# cat /sys/kernel/debug/batman_adv/bat0/log
+
The additional debug output is by default disabled. It can be en-
-abled either at kernel modules load time or during run time. To
-enable debug output at module load time, add the module parameter
-debug=<value>. <value> can take one of four values.
+abled during run time. Following log_levels are defined:
0 - All debug output disabled
1 - Enable messages related to routing / flooding / broadcasting
2 - Enable route or hna added / changed / deleted
3 - Enable all messages
-e.g.
+The debug output can be changed at runtime using the file
+/sys/class/net/bat0/mesh/log_level. e.g.
-# modprobe batman-adv debug=2
+# echo 2 > /sys/class/net/bat0/mesh/log_level
-will load the module and enable debug messages for when routes or
-HNAs change.
+will enable debug messages for when routes or HNAs change.
-The debug output can also be changed at runtime using the file
-/sys/module/batman-adv/parameters/debug. e.g.
-# echo 2 > /sys/module/batman-adv/parameters/debug
-
-enables debug messages for when routes or HNAs
-
-The debug output is sent to the kernel logs. So try dmesg, lo-
-gread, etc to see the debug messages.
-
-
BATCTL
------
Author: simon
Date: 2010-09-04 14:07:10 +0200 (Sat, 04 Sep 2010)
New Revision: 1783
Modified:
trunk/batctl/Makefile
Log:
batctl: use dotted format in copyright statement
Signed-off-by: Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de>
Modified: trunk/batctl/Makefile
===================================================================
--- trunk/batctl/Makefile 2010-09-04 11:50:56 UTC (rev 1782)
+++ trunk/batctl/Makefile 2010-09-04 12:07:10 UTC (rev 1783)
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2006-2010 BATMAN contributors
+# Copyright (C) 2006-2010 B.A.T.M.A.N. contributors
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
Author: simon
Date: 2010-09-04 13:50:56 +0200 (Sat, 04 Sep 2010)
New Revision: 1782
Modified:
trunk/batman-adv/hard-interface.c
trunk/batman-adv/send.c
Log:
batman-adv: Revert "Adding netfilter-bridge hooks"
The netfilter hook seems to be misused and may not filter everything as
expected. Also the ethernet bridge tables are not yet capable to
understand batman-adv packet correctly.
It was only added for testing purposes and can be removed again.
Reported-by: Vasiliy Kulikov <segooon(a)gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
Modified: trunk/batman-adv/hard-interface.c
===================================================================
--- trunk/batman-adv/hard-interface.c 2010-09-04 10:50:06 UTC (rev 1781)
+++ trunk/batman-adv/hard-interface.c 2010-09-04 11:50:56 UTC (rev 1782)
@@ -30,7 +30,6 @@
#include "hash.h"
#include <linux/if_arp.h>
-#include <linux/netfilter_bridge.h>
#include "compat.h"
@@ -495,29 +494,46 @@
return NOTIFY_DONE;
}
-static int batman_skb_recv_finish(struct sk_buff *skb)
+/* receive a packet with the batman ethertype coming on a hard
+ * interface */
+int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
+ struct packet_type *ptype, struct net_device *orig_dev)
{
+ struct bat_priv *bat_priv;
struct batman_packet *batman_packet;
struct batman_if *batman_if;
- struct bat_priv *bat_priv;
int ret;
- batman_if = get_batman_if_by_netdev(skb->dev);
- if (!batman_if)
+ batman_if = container_of(ptype, struct batman_if, batman_adv_ptype);
+ skb = skb_share_check(skb, GFP_ATOMIC);
+
+ /* skb was released by skb_share_check() */
+ if (!skb)
+ goto err_out;
+
+ /* packet should hold at least type and version */
+ if (unlikely(!pskb_may_pull(skb, 2)))
goto err_free;
- if (!batman_if->soft_iface)
+ /* expect a valid ethernet header here. */
+ if (unlikely(skb->mac_len != sizeof(struct ethhdr)
+ || !skb_mac_header(skb)))
goto err_free;
- /* discard frames on not active interfaces */
- if (batman_if->if_status != IF_ACTIVE)
+ if (!batman_if->soft_iface)
goto err_free;
bat_priv = netdev_priv(batman_if->soft_iface);
+
if (atomic_read(&bat_priv->mesh_state) != MESH_ACTIVE)
goto err_free;
+ /* discard frames on not active interfaces */
+ if (batman_if->if_status != IF_ACTIVE)
+ goto err_free;
+
batman_packet = (struct batman_packet *)skb->data;
+
if (batman_packet->version != COMPAT_VERSION) {
bat_dbg(DBG_BATMAN, bat_priv,
"Drop packet: incompatible batman version (%i)\n",
@@ -563,42 +579,18 @@
}
if (ret == NET_RX_DROP)
- goto err_free;
+ kfree_skb(skb);
- return 0;
+ /* return NET_RX_SUCCESS in any case as we
+ * most probably dropped the packet for
+ * routing-logical reasons. */
-err_free:
- kfree_skb(skb);
- return 0;
-}
+ return NET_RX_SUCCESS;
-/* receive a packet with the batman ethertype coming on a hard
- * interface */
-int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
- struct packet_type *ptype, struct net_device *orig_dev)
-{
- skb = skb_share_check(skb, GFP_ATOMIC);
-
- /* skb was released by skb_share_check() */
- if (!skb)
- return 0;
-
- /* packet should hold at least type and version */
- if (unlikely(!pskb_may_pull(skb, 2)))
- goto err_free;
-
- /* expect a valid ethernet header here. */
- if (unlikely(skb->mac_len != sizeof(struct ethhdr) ||
- !skb_mac_header(skb)))
- goto err_free;
-
- /* if netfilter/ebtables wants to block incoming batman
- * packets then give them a chance to do so here */
- return NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, dev,
- NULL, batman_skb_recv_finish);
err_free:
kfree_skb(skb);
- return 0;
+err_out:
+ return NET_RX_DROP;
}
struct notifier_block hard_if_notifier = {
Modified: trunk/batman-adv/send.c
===================================================================
--- trunk/batman-adv/send.c 2010-09-04 10:50:06 UTC (rev 1781)
+++ trunk/batman-adv/send.c 2010-09-04 11:50:56 UTC (rev 1782)
@@ -29,7 +29,6 @@
#include "vis.h"
#include "aggregation.h"
#include "gateway_common.h"
-#include <linux/netfilter_bridge.h>
#include "compat.h"
@@ -94,12 +93,9 @@
/* dev_queue_xmit() returns a negative result on error. However on
* congestion and traffic shaping, it drops and returns NET_XMIT_DROP
- * (which is > 0). This will not be treated as an error.
- * Also, if netfilter/ebtables wants to block outgoing batman
- * packets then giving them a chance to do so here */
+ * (which is > 0). This will not be treated as an error. */
- return NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev,
- dev_queue_xmit);
+ return dev_queue_xmit(skb);
send_skb_err:
kfree_skb(skb);
return NET_XMIT_DROP;
Author: simon
Date: 2010-09-04 12:50:06 +0200 (Sat, 04 Sep 2010)
New Revision: 1781
Modified:
trunk/batctl/debugfs.c
trunk/batctl/debugfs.h
Log:
batctl: remove dead code
We don't need the debugfs_force_cleanup() and debugfs_umount() function
in batctl and therefore remove it. We keep it debugfs_read() even
if unreferenced for later usage.
Signed-off-by: Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de>
Modified: trunk/batctl/debugfs.c
===================================================================
--- trunk/batctl/debugfs.c 2010-08-29 00:02:14 UTC (rev 1780)
+++ trunk/batctl/debugfs.c 2010-09-04 10:50:06 UTC (rev 1781)
@@ -41,14 +41,6 @@
NULL,
};
-/* use this to force a umount */
-void debugfs_force_cleanup(void)
-{
- debugfs_find_mountpoint();
- debugfs_premounted = 0;
- debugfs_umount();
-}
-
/* construct a full path to a debugfs element */
int debugfs_make_path(const char *fmt, char *mesh_iface, char *buffer, int size)
{
@@ -163,27 +155,6 @@
return debugfs_mountpoint;
}
-/* umount the debugfs */
-
-int debugfs_umount(void)
-{
- char umountcmd[128];
- int ret;
-
- /* if it was already mounted, leave it */
- if (debugfs_premounted)
- return 0;
-
- /* make sure it's a valid mount point */
- ret = debugfs_valid_mountpoint(debugfs_mountpoint);
- if (ret)
- return ret;
-
- snprintf(umountcmd, sizeof(umountcmd),
- "/bin/umount %s", debugfs_mountpoint);
- return system(umountcmd);
-}
-
int debugfs_write(const char *entry, const char *value)
{
char path[MAX_PATH+1];
Modified: trunk/batctl/debugfs.h
===================================================================
--- trunk/batctl/debugfs.h 2010-08-29 00:02:14 UTC (rev 1780)
+++ trunk/batctl/debugfs.h 2010-09-04 10:50:06 UTC (rev 1781)
@@ -37,10 +37,8 @@
extern int debugfs_valid_mountpoint(const char *debugfs);
extern int debugfs_valid_entry(const char *path);
extern char *debugfs_mount(const char *mountpoint);
-extern int debugfs_umount(void);
extern int debugfs_write(const char *entry, const char *value);
extern int debugfs_read(const char *entry, char *buffer, size_t size);
-extern void debugfs_force_cleanup(void);
extern int debugfs_make_path(const char *fmt, char *mesh_iface,
char *buffer, int size);
The following commit has been merged in the linux branch:
commit 2aa1367d56254c93e7d80bb4fd2a425f71798303
Author: Sven Eckelmann <sven.eckelmann(a)gmx.de>
Date: Fri Sep 3 22:54:40 2010 +0200
Staging: batman-adv: Remove CHANGELOG
The changelog is only generated on standalone releases. Thus it has no
real value for the in-kernel version of batman-adv.
Reported-by: Abraham Arce <abraham.arce.moreno(a)gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
diff --git a/drivers/staging/batman-adv/CHANGELOG b/drivers/staging/batman-adv/CHANGELOG
deleted file mode 100644
index 86450b4..0000000
--- a/drivers/staging/batman-adv/CHANGELOG
+++ /dev/null
@@ -1,63 +0,0 @@
-batman-adv 2010.0.0:
-
-* support latest kernels (2.6.21 - 2.6.35)
-* further code refactoring and cleaning for coding style
-* move from procfs based configuration to sysfs
-* reorganized sequence number handling
-* limit queue lengths for batman and broadcast packets
-* many bugs (endless loop and rogue packets on shutdown, wrong tcpdump output,
- missing frees in error situations, sleeps in atomic contexts) squashed
-
- -- Fri, 18 Jun 2010 21:34:26 +0200
-
-batman-adv 0.2.1:
-
-* support latest kernels (2.6.20 - 2.6.33)
-* receive packets directly using skbs, remove old sockets and threads
-* fix various regressions in the vis server
-* don't disable interrupts while sending
-* replace internal logging mechanism with standard kernel logging
-* move vis formats into userland, one general format remains in the kernel
-* allow MAC address to be set, correctly initialize them
-* code refactoring and cleaning for coding style
-* many bugs (null pointers, locking, hash iterators) squashed
-
- -- Sun, 21 Mar 2010 20:46:47 +0100
-
-batman-adv 0.2:
-
-* support latest kernels (2.6.20 - 2.6.31)
-* temporary routing loops / TTL code bug / ghost entries in originator table fixed
-* internal packet queue for packet aggregation & transmission retry (ARQ)
- for payload broadcasts added
-* interface detection converted to event based handling to avoid timers
-* major linux coding style adjustments applied
-* all kernel version compatibility functions has been moved to compat.h
-* use random ethernet address generator from the kernel
-* /sys/module/batman_adv/version to export kernel module version
-* vis: secondary interface export for dot draw format + JSON output format added
-* many bugs (alignment issues, race conditions, deadlocks, etc) squashed
-
- -- Sat, 07 Nov 2009 15:44:31 +0100
-
-batman-adv 0.1:
-
-* support latest kernels (2.6.20 - 2.6.28)
-* LOTS of cleanup: locking, stack usage, memory leaks
-* Change Ethertype from 0x0842 to 0x4305
- unregistered at IEEE, if you want to sponsor an official Ethertype ($2500)
- please contact us
-
- -- Sun, 28 Dec 2008 00:44:31 +0100
-
-batman-adv 0.1-beta:
-
-* layer 2 meshing based on BATMAN TQ algorithm in kernelland
-* operates on any ethernet like interface
-* supports IPv4, IPv6, DHCP, etc
-* is controlled via /proc/net/batman-adv/
-* bridging via brctl is supported
-* interface watchdog (interfaces can be (de)activated dynamically)
-* offers integrated vis server which meshes/syncs with other vis servers in range
-
- -- Mon, 05 May 2008 14:10:04 +0200
--
linux integration