diff options
author | James Yonan <james@openvpn.net> | 2011-08-19 03:07:27 +0000 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2011-08-24 13:33:53 +0200 |
commit | a3beba0042312a479a706c34d977bb0944f824fd (patch) | |
tree | 6245628030c0e95ec940820e7021916b87de172c /route.c | |
parent | 5455b3989559ee3278b24af5b78b1d750d8aa531 (diff) | |
download | openvpn-a3beba0042312a479a706c34d977bb0944f824fd.tar.gz openvpn-a3beba0042312a479a706c34d977bb0944f824fd.tar.xz openvpn-a3beba0042312a479a706c34d977bb0944f824fd.zip |
Fixed issue where redirect-gateway block-local code was not
correctly calculating the two halves of the subnet if the
gateway was in the upper half (Gert Doering).
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7537 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'route.c')
-rw-r--r-- | route.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -492,9 +492,9 @@ add_block_local_item (struct route_list *rl, CLEAR(r); r.flags = RT_DEFINED; r.gateway = target; + r.network = gateway->addr & gateway->netmask; l2 = ((~gateway->netmask)+1)>>1; r.netmask = ~(l2-1); - r.network = gateway->addr & r.netmask; rl->routes[rl->n++] = r; r.network += l2; rl->routes[rl->n++] = r; |