From: Guus Sliepen Date: Tue, 2 Mar 2010 22:27:50 +0000 (+0100) Subject: Fixes for the Forwarding option. X-Git-Tag: import-tinc-1.1~558^2~4 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=8ae54dc7c782bcc4b771ec0766fcf9eee115756e;p=meshlink Fixes for the Forwarding option. --- diff --git a/src/net_setup.c b/src/net_setup.c index 867fef94..70291bff 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -360,11 +360,11 @@ bool setup_myself(void) { if(get_config_string(lookup_config(config_tree, "Forwarding"), &mode)) { if(!strcasecmp(mode, "off")) - routing_mode = FMODE_OFF; + forwarding_mode = FMODE_OFF; else if(!strcasecmp(mode, "internal")) - routing_mode = FMODE_INTERNAL; + forwarding_mode = FMODE_INTERNAL; else if(!strcasecmp(mode, "kernel")) - routing_mode = FMODE_KERNEL; + forwarding_mode = FMODE_KERNEL; else { logger(LOG_ERR, "Invalid forwarding mode!"); return false; diff --git a/src/route.c b/src/route.c index 4e7f7e58..853b7f5b 100644 --- a/src/route.c +++ b/src/route.c @@ -844,7 +844,7 @@ static void route_mac(node_t *source, vpn_packet_t *packet) { } void route(node_t *source, vpn_packet_t *packet) { - if(forwarding_mode == FMODE_KERNEL) { + if(forwarding_mode == FMODE_KERNEL && source != myself) { send_packet(myself, packet); return; }