The following commit has been merged in the master branch: commit bc636f673af35bcd0e53a8c566dbb573f154dd27 Author: Marek Lindner lindner_marek@yahoo.de Date: Wed Oct 18 22:52:06 2006 +0200
set TTL = 2 on non-primary interfaces
diff --git a/batman.c b/batman.c index 9ac431f..1982118 100755 --- a/batman.c +++ b/batman.c @@ -880,7 +880,7 @@ int batman()
batman_if->out.orig = batman_if->addr.sin_addr.s_addr; batman_if->out.flags = 0x00; - batman_if->out.ttl = TTL; + batman_if->out.ttl = ( batman_if->if_num == 0 ? TTL : 2 ); batman_if->out.seqno = 0; batman_if->out.gwflags = gateway_class; batman_if->out.version = BATMAN_VERSION; diff --git a/posix.c b/posix.c index fe1e2c3..ab18981 100644 --- a/posix.c +++ b/posix.c @@ -301,8 +301,10 @@ void del_default_route() {
int add_default_route() {
- if (pthread_create( &curr_gateway_thread_id, NULL, &client_to_gw_tun, curr_gateway ) != 0) + if (pthread_create( &curr_gateway_thread_id, NULL, &client_to_gw_tun, curr_gateway ) != 0) { perror("Could not spawn thread"); + curr_gateway = NULL; + }
return 1;