diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-01 11:10:12 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-01 11:10:12 +0000 |
commit | c70caa7fd4a631f42b136bdcf3c5199774ed09e5 (patch) | |
tree | 61af66570e5380346e90bdbd7f59730b4a9e31c9 /push.c | |
parent | d5bef8ff0c19400626d0900cfddbe2a241492db0 (diff) | |
download | openvpn-c70caa7fd4a631f42b136bdcf3c5199774ed09e5.tar.gz openvpn-c70caa7fd4a631f42b136bdcf3c5199774ed09e5.tar.xz openvpn-c70caa7fd4a631f42b136bdcf3c5199774ed09e5.zip |
Renamed sample-keys/tmp-ca.crt to ca.crt.
Fixed bug where remove_iroutes_from_push_route_list
was missing routes if those routes had
an implied netmask (by omission) of 255.255.255.255.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@587 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'push.c')
-rw-r--r-- | push.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -273,12 +273,12 @@ remove_iroutes_from_push_route_list (struct options *o) if (parse_line (line, p, SIZE (p), "[PUSH_ROUTE_REMOVE]", 1, D_ROUTE_DEBUG, &gc)) { /* is the push item a route directive? */ - if (p[0] && p[1] && p[2] && !strcmp (p[0], "route")) + if (p[0] && !strcmp (p[0], "route") && !p[3]) { /* get route parameters */ bool status1, status2; const in_addr_t network = getaddr (GETADDR_HOST_ORDER, p[1], 0, &status1, NULL); - const in_addr_t netmask = getaddr (GETADDR_HOST_ORDER, p[2], 0, &status2, NULL); + const in_addr_t netmask = getaddr (GETADDR_HOST_ORDER, p[2] ? p[2] : "255.255.255.255", 0, &status2, NULL); /* did route parameters parse correctly? */ if (status1 && status2) @@ -288,7 +288,7 @@ remove_iroutes_from_push_route_list (struct options *o) /* does route match an iroute? */ for (ir = o->iroutes; ir != NULL; ir = ir->next) { - if (network == ir->network && netmask == netbits_to_netmask (ir->netbits)) + if (network == ir->network && netmask == netbits_to_netmask (ir->netbits >= 0 ? ir->netbits : 32)) { copy = false; break; |