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
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;