I have three nodes running OpenWrt r16484 (SVN) and batman-advanced
r1298. All nodes show each other in originators. batping gets host
unreachable for all relationships, and the host unreachable messages
come very quickly, maybe 1000/second. Here is a log sample, log_level
4. log_level 11 doesn't show anything.
The setup I'm using worked fine with r1176. Using ahdemo.
[ 42949625] Received BATMAN packet via NB: 00:15:6d:a7:6a:9e, IF:
ath0 [00:15:6d:a7:6a:9c] (from OG: 00:15:6d:a7:6a:9e, via old OG:
00:15:6d:a7:6a:9e, seqno 214, tq 255, TTL 50, V 7, IDF 0)
[ 42949625] updating last_seqno: old 213, new 214
[ 42949625] bidirectional: orig = 00:15:6d:a7:6a:9e neigh =
00:15:6d:a7:6a:9e => own_bcast = 64, real recv = 64, local tq: 255,
asym_penality: 255, total tq: 255
[ 42949625] update_originator(): Searching and updating originator
entry of received packet
[ 42949625] Updating existing last-hop neighbour of originator
[ 42949625] Forwarding packet: tq_orig: 255, tq_avg: 255, tq_forw:
250, ttl_orig: 49, ttl_forw: 49
[ 42949625] Forwarding packet: rebroadcast neighbour packet with
direct link flag
[ 42949625] Sending own packet (originator 00:15:6d:a7:6a:9c, seqno
216, TQ 255, TTL 50, IDF off) on interface ath0 [00:15:6d:a7:6a:9c]
[ 42949625] Received BATMAN packet via NB: 00:15:6d:a7:6a:14, IF:
ath0 [00:15:6d:a7:6a:9c] (from OG: 00:15:6d:a7:6a:9e, via old OG:
00:15:6d:a7:6a:9e, seqno 214, tq 240, TTL 49, V 7, IDF 1)
[ 42949625] bidirectional: orig = 00:15:6d:a7:6a:9e neigh =
00:15:6d:a7:6a:14 => own_bcast = 63, real recv = 64, local tq: 251,
asym_penality: 255, total tq: 236
[ 42949625] update_originator(): Searching and updating originator
entry of received packet
[ 42949625] Updating existing last-hop neighbour of originator
[ 42949625] Drop packet: duplicate packet received
[ 42949625] Forwarding packet (originator 00:15:6d:a7:6a:9e, seqno
214, TQ 240, TTL 49, IDF on) on interface ath0 [00:15:6d:a7:6a:9c]
[ 42949625] Received BATMAN packet via NB: 00:15:6d:a7:6a:9e, IF:
ath0 [00:15:6d:a7:6a:9c] (from OG: 00:15:6d:a7:6a:9c, via old OG:
00:15:6d:a7:6a:9c, seqno 216, tq 236, TTL 49, V 7, IDF 1)
[ 42949625] Drop packet: originator packet from myself (via neighbour)
[ 42949625] Received BATMAN packet via NB: 00:15:6d:a7:6a:14, IF:
ath0 [00:15:6d:a7:6a:9c] (from OG: 00:15:6d:a7:6a:9c, via old OG:
00:15:6d:a7:6a:9c, seqno 216, tq 240, TTL 49, V 7, IDF 1)
[ 42949625] Drop packet: originator packet from myself (via neighbour)
[ 42949625] Received BATMAN packet via NB: 00:15:6d:a7:6a:14, IF:
ath0 [00:15:6d:a7:6a:9c] (from OG: 00:15:6d:a7:6a:14, via old OG:
00:15:6d:a7:6a:14, seqno 205, tq 255, TTL 50, V 7, IDF 0)
[ 42949625] updating last_seqno: old 204, new 205
[ 42949625] bidirectional: orig = 00:15:6d:a7:6a:14 neigh =
00:15:6d:a7:6a:14 => own_bcast = 64, real recv = 64, local tq: 255,
asym_penality: 255, total tq: 255
[ 42949625] update_originator(): Searching and updating originator
entry of received packet
[ 42949625] Updating existing last-hop neighbour of originator
[ 42949625] Forwarding packet: tq_orig: 255, tq_avg: 254, tq_forw:
250, ttl_orig: 49, ttl_forw: 49
[ 42949625] Forwarding packet: rebroadcast neighbour packet with
direct link flag
[ 42949625] Received BATMAN packet via NB: 00:15:6d:a7:6a:9e, IF:
ath0 [00:15:6d:a7:6a:9c] (from OG: 00:15:6d:a7:6a:14, via old OG:
00:15:6d:a7:6a:14, seqno 205, tq 240, TTL 49, V 7, IDF 1)
[ 42949625] bidirectional: orig = 00:15:6d:a7:6a:14 neigh =
00:15:6d:a7:6a:9e => own_bcast = 64, real recv = 64, local tq: 255,
asym_penality: 255, total tq: 240
[ 42949625] update_originator(): Searching and updating originator
entry of received packet
[ 42949625] Updating existing last-hop neighbour of originator
[ 42949625] Drop packet: duplicate packet received
[ 42949625] Forwarding packet (originator 00:15:6d:a7:6a:14, seqno
205, TQ 240, TTL 49, IDF on) on interface ath0 [00:15:6d:a7:6a:9c]
Hi
Jonathan here I am attending a code sprint here at CSIR in South Africa.
We are using B.A.T.M.A.N as a mesh networking software. We ran into a bug
which occurred with web browser whereby the data written back through the
socket was not complete thereby causing an error with our program.
The fix works by making sure that all the data that is to be sent in the
send_buffer is sent. It checks the value of ret until it equals the size of
the data to be sent.
--
Index: vis.c
===================================================================
--- vis.c (revision 1336)
+++ vis.c (working copy)
@@ -580,8 +580,18 @@
} else {
send_buffer = current->json_buffer;
}
+
+ ret = write( thread_data->socket, send_buffer, strlen(
send_buffer ));
- ret = write( thread_data->socket, send_buffer, strlen(
send_buffer ) );
+ while(ret != strlen( send_buffer )) {
+ send_buffer += ret;
+
+ if ( fsync(thread_data->socket) != 0 ) {
+ ret = write(thread_data->socket, send_buffer, strlen(
send_buffer ));
+ }
+
+ }
+
if( ret != strlen( send_buffer ) || (thread_data->format ==
json) )
{
pthread_mutex_lock( ¤t->mutex );