Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix throwRules option, closes #144.

  • Loading branch information...
commit 7db63ebb4dc5b468d9143212988d701156bb2a59 1 parent 6b06620
@sim6 sim6 authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 ip.c
View
7 ip.c
@@ -2456,8 +2456,10 @@ int update_interface_rules(void)
assertion(-500609, is_ip_set(&ian->ip_addr));
+/*
if (ian->ifa.ifa_family != AF_CFG)
continue;
+*/
if (!ian->ifa.ifa_prefixlen)
continue;
@@ -2482,10 +2484,11 @@ int update_interface_rules(void)
continue;
struct net_key throw;
- setNet(&throw, AF_CFG, ian->ifa.ifa_prefixlen, &ian->ip_addr);
+ setNet(&throw, ian->ifa.ifa_family, ian->ifa.ifa_prefixlen, &ian->ip_addr);
ip_netmask_validate(&throw.ip, throw.mask, throw.af, YES);
- ip(IP_THROW_MY_NET, ADD, NO, &throw, RT_TABLE_HNA, 0, 0, 0, 0, 0, 0);
+ ip(IP_THROW_MY_NET, ADD, NO, &throw, RT_TABLE_HNA, RT_PRIO_HNA, 0, throw.af == AF_INET6, 0, 0, 0);
+ ip(IP_THROW_MY_NET, ADD, NO, &throw, RT_TABLE_TUN, RT_PRIO_TUNS, 0, throw.af == AF_INET6, 0, 0, 0);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.