The following commit has been merged in the master branch: commit 9e4fd67e1705c30e373a680de78ec9832ac523ec Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Sep 12 21:29:04 2006 +0200
gateway debug II
diff --git a/linux.c b/linux.c index c25bf97..9ea92ee 100755 --- a/linux.c +++ b/linux.c @@ -93,9 +93,9 @@ void add_del_route(unsigned int dest, unsigned int router, int del, char *dev, i
route.rt_flags |= RTF_GATEWAY;
- output("%s route to %s via %s\n", del ? "Deleting" : "Adding", str1, str2); + output("%s route to %s via %s (%s)\n", del ? "Deleting" : "Adding", str1, str2, dev); } else { - output("%s route to %s via 0.0.0.0\n", del ? "Deleting" : "Adding", str1); + output("%s route to %s via 0.0.0.0 (%s)\n", del ? "Deleting" : "Adding", str1, dev); }
route.rt_metric = 1; diff --git a/posix.c b/posix.c index 56b8881..59977a1 100644 --- a/posix.c +++ b/posix.c @@ -256,7 +256,7 @@ void del_default_route() {
curr_gateway = NULL;
-// add_del_route( 0, curr_gateway_ip, 1, curr_gateway_ipip_if, curr_gateway_ipip_fd ); + add_del_route( 0, curr_gateway_ip, 1, curr_gateway_ipip_if, curr_gateway_ipip_fd );
close( curr_gateway_tcp_sock ); del_ipip_tun( curr_gateway_ipip_fd ); @@ -305,7 +305,7 @@ int add_default_route() {
if ( add_ipip_tun( curr_gateway_batman_if, curr_gateway_ip, curr_gateway_ipip_if, &curr_gateway_ipip_fd ) > 0 ) {
-// add_del_route( 0, curr_gateway_ip, 0, curr_gateway_ipip_if, curr_gateway_ipip_fd ); + add_del_route( 0, curr_gateway_ip, 0, curr_gateway_ipip_if, curr_gateway_ipip_fd ); return 1;
} else {