diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 98f5489..694d086 100644
a
|
b
|
do_init_traffic_shaper (struct context *c) |
1145 | 1145 | } |
1146 | 1146 | |
1147 | 1147 | /* |
1148 | | * Allocate a route list structure if at least one |
1149 | | * --route option was specified. |
| 1148 | * Allocate route list structures for IPv4 and IPv6 |
| 1149 | * (we do this for IPv4 even if no --route option has been seen, as other |
| 1150 | * parts of OpenVPN might want to fill the route-list with info, e.g. DHCP) |
1150 | 1151 | */ |
1151 | 1152 | static void |
1152 | 1153 | do_alloc_route_list (struct context *c) |
1153 | 1154 | { |
1154 | | if (c->options.routes && !c->c1.route_list) |
| 1155 | if (!c->c1.route_list) |
1155 | 1156 | c->c1.route_list = new_route_list (c->options.max_routes, &c->gc); |
1156 | 1157 | if (c->options.routes_ipv6 && !c->c1.route_ipv6_list) |
1157 | 1158 | c->c1.route_ipv6_list = new_route_ipv6_list (c->options.max_routes, &c->gc); |
diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index f5b5efa..72ecbaf 100644
a
|
b
|
route_list_add_vpn_gateway (struct route_list *rl, |
503 | 503 | struct env_set *es, |
504 | 504 | const in_addr_t addr) |
505 | 505 | { |
| 506 | ASSERT(rl); |
506 | 507 | rl->spec.remote_endpoint = addr; |
507 | 508 | rl->spec.flags |= RTSA_REMOTE_ENDPOINT; |
508 | 509 | setenv_route_addr (es, "vpn_gateway", rl->spec.remote_endpoint, -1); |