Skip to content

Commit

Permalink
Fixes for the Forwarding option.
Browse files Browse the repository at this point in the history
  • Loading branch information
gsliepen committed Mar 2, 2010
1 parent 3e4829e commit 8ae54dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/net_setup.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/route.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8ae54dc

Please sign in to comment.