Hi,
at the battlemesh we had plenty of time to discuss and test the tvlv
patchset. Therefore, a number of changes/fixes found their way into
v2 touching the tvlv API, network coding, unicast sending and gateway
announcements.
This looks like the final version which is going to be merged unless
objections are raised soon-ish.
Cheers,
Marek
This is the fourteenth revision of the basic multicast optimization patches.
Changes in v14 include:
* fixed compilation for CONFIG_BATMAN_ADV_MCAST=n (issue was introduced by v13)
* fixed potential null pointer exception (moved ethhdr assignment in
batadv_mcast_forw_mode() to after the check methods / pskb_may_pull()s)
* removed flag-list-"helper" functions
* removed methods which were performing both counting and orig_node retrieval
in batadv_mcast_forw_mode(), instead doing that in two logical, seperate
sections in batadv_mcast_forw_mode()
Cheers, Linus
Hi,
this is v2 of this series. I removed the hashtable patches for the moment. The
types.h patch is fixed to include linux headers only when compiling for the
kernel so that it can still be used in batctl.
Major changes (Patch 1-7):
- Compiling debugfs.c only when CONFIG_DEBUG_FS is selected. This reduces the
amount of unnecessary code that is executed. At the moment all calls to
debugfs functions will result in NOOPs. However there is some more code that
we simply don't need without DEBUG_FS.
- tvlv is separated from the large main.c file into its own tvlv.c. I don't
see a reason to have this set of functions for tvlv inside the main.c file.
Minor changes (Patch 8-26):
- Removing unnecessary return value variables
- Fixing some comments
- Reordering functions to increase readability
- Coding style fixes
- Declare boolean return types as bool
- Add missing includes
Best regards,
Markus
Markus Pargmann (26):
batman-adv: debugfs, avoid compiling for !DEBUG_FS
batman-adv: Separate logging header
batman-adv: iv_ogm, Reduce code duplication
batman-adv: iv_ogm, divide and round for ring buffer avg
batman-adv: init, Add some error handling
batman-adv: tvlv realloc, move error handling into if block
batman-adv: split tvlv into a seperate file
batman-adv: Makefile, Sort alphabetically
batman-adv: iv_ogm_iface_enable, direct return values
batman-adv: iv_ogm_aggr_packet, bool return value
batman-adv: iv_ogm_send_to_if, declare char* as const
batman-adv: iv_ogm_can_aggregate, code readability
batman-adv: iv_ogm_orig_update, remove unnecessary brackets
batman-adv: iv_ogm_aggregate_new, simplify error handling
batman-adv: iv_ogm_queue_add, Simplify expressions
batman-adv: iv_ogm_orig_update, style, add missin brackets
batman-adv: iv_ogm, Fix dup_status comment
batman-adv: iv_ogm, fix coding style
batman-adv: iv_ogm, fix comment function name
batman-adv: types, Fix comment on bcast_own
batman-adv: main, Convert is_my_mac() to bool
batman-adv: main, batadv_compare_eth return bool
batman-adv: Remove unnecessary ret variable
batman-adv: Remove unnecessary ret variable in algo_register
batman-adv: packet.h, add some missing includes
batman-adv: types.h, add missing include
Makefile.kbuild | 5 +-
bat_iv_ogm.c | 239 +++++++++---------
bitarray.c | 1 +
bridge_loop_avoidance.c | 1 +
debugfs.c | 9 +-
debugfs.h | 39 +++
distributed-arp-table.c | 2 +
gateway_client.c | 1 +
gateway_common.c | 2 +
hard-interface.c | 1 +
icmp_socket.c | 1 +
log.h | 82 +++++++
main.c | 626 +++---------------------------------------------
main.h | 101 +-------
multicast.c | 1 +
network-coding.c | 2 +
originator.c | 1 +
packet.h | 5 +
routing.c | 2 +
send.c | 1 +
sysfs.c | 1 +
translation-table.c | 2 +
tvlv.c | 592 +++++++++++++++++++++++++++++++++++++++++++++
tvlv.h | 62 +++++
types.h | 8 +-
25 files changed, 967 insertions(+), 820 deletions(-)
create mode 100644 log.h
create mode 100644 tvlv.c
create mode 100644 tvlv.h
--
2.1.3
Reported-by: MK <mailing.m1(a)kkk-web.de>
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
README | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/README b/README
index 90a99de..205c156 100644
--- a/README
+++ b/README
@@ -256,6 +256,32 @@ To get JSON formatted output, use:
See gpsd_json(5) for documentation of the tpv object.
+Running alfred as non-root user
+-------------------------------
+
+Alfred currently requires special capabilities and access rights to work
+correctly. The user root is normally the only user having these
+capabilities/rights on a standard Linux system.
+
+Operations requiring special capabilities:
+
+ * bind to device
+ * creating the unix socket
+ * accessing the debugfs filesystem
+
+The first operation can still be executed when the admin grants the special
+capability CAP_NET_RAW to anyone executing the alfred binary. The unix socket
+can also be moved to a different directly which is accessible by the user by
+adding the parameter '-u'.
+
+ $ sudo setcap cap_net_raw+ep alfred
+ $ ./alfred -u alfred.sock -i eth0
+
+The user running alfred must still be in a group which is allowed to access
+/sys/kernel/debugfs to correctly choose best neighbors for communication.
+It is possible (but not recommended) to disable the neighbor
+selection/prioritization using the parameter '-b none'.
+
License
-------
--
2.1.4
in leipzig since months we have problems with batman-adv and these
start/stop scripts or netifd-stuff.
we thought that this might be our own special problem, because we are
using more than one batman-adv instance (separated by vlan).
but its still there, also on openwrt-cc-trunk, now also on our
batman-adv super-gluon-node-servers (using fastd) on virtualized
x86-openwrt.
so f.i. i can crash that system in a way by: etc/init.d/fastd stop
please help us and have a look at our local ticket number 23
https://github.com/freifunk/firmware-leipzig/issues/23
good luck
ufo
root@vpnb9:~# batctl -v
batctl 2014.4.0 [batman-adv: 2014.4.0]
root@vpnb9:~# fastd -v
fastd v17
root@vpnb9:~# cat /etc/openwrt_*
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='Bleeding Edge'
DISTRIB_REVISION='r44497'
DISTRIB_CODENAME='chaos_calmer'
DISTRIB_TARGET='x86/kvm_guest'
DISTRIB_DESCRIPTION='OpenWrt Chaos Calmer r44497'
DISTRIB_TAINTS=''
r44497
--
---
Freifunk Leipzig http://leipzig.freifunk.net
Hi Joe,
we have come across a checkpatch false-positive:
>>>>
static void batadv_recv_handler_init(void)
{
int i;
for (i = 0; i < ARRAY_SIZE(batadv_rx_handler); i++)
batadv_rx_handler[i] = batadv_recv_unhandled_packet;
for (i = BATADV_UNICAST_MIN; i <= BATADV_UNICAST_MAX; i++)
batadv_rx_handler[i] = batadv_recv_unhandled_unicast_packet;
/* compile time checks for sizes */
BUILD_BUG_ON(sizeof(struct batadv_bla_claim_dst) != 6);
BUILD_BUG_ON(sizeof(struct batadv_ogm_packet) != 24);
BUILD_BUG_ON(sizeof(struct batadv_icmp_header) != 20);
..
}
<<<<<
The following warnings are triggered:
CHECK: No space is necessary after a cast
#440: FILE: main.c:440:
+ BUILD_BUG_ON(sizeof(struct batadv_bla_claim_dst) != 6);
CHECK: No space is necessary after a cast
#441: FILE: main.c:441:
+ BUILD_BUG_ON(sizeof(struct batadv_ogm_packet) != 24);
CHECK: No space is necessary after a cast
#442: FILE: main.c:442:
+ BUILD_BUG_ON(sizeof(struct batadv_icmp_header) != 20);
Can you make a suggestion / patch for checkpatch to better handle this case ?
Thanks,
Marek