From: Guus Sliepen Date: Tue, 2 Mar 2010 22:27:50 +0000 (+0100) Subject: Fixes for the Forwarding option. X-Git-Tag: release-1.0.13~13 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=8ae54dc7c782bcc4b771ec0766fcf9eee115756e;p=tinc 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; }