diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index 024cd58..c65afd3 100644
a
|
b
|
process_ip_header (struct context *c, unsigned int flags, struct buffer *buf) |
1017 | 1017 | if (!c->options.passtos) |
1018 | 1018 | flags &= ~PIPV4_PASSTOS; |
1019 | 1019 | #endif |
| 1020 | #ifdef ENABLE_EXTRACT_DHCP_ROUTER |
1020 | 1021 | if (!c->options.route_gateway_via_dhcp) |
1021 | 1022 | flags &= ~PIPV4_EXTRACT_DHCP_ROUTER; |
1022 | | |
| 1023 | #endif |
1023 | 1024 | if (buf->len > 0) |
1024 | 1025 | { |
1025 | 1026 | /* |
… |
… |
process_ip_header (struct context *c, unsigned int flags, struct buffer *buf) |
1053 | 1054 | client_nat_transform (c->options.client_nat, &ipbuf, direction); |
1054 | 1055 | } |
1055 | 1056 | #endif |
| 1057 | #ifdef ENABLE_EXTRACT_DHCP_ROUTER |
1056 | 1058 | /* possibly extract a DHCP router message */ |
1057 | 1059 | if (flags & PIPV4_EXTRACT_DHCP_ROUTER) |
1058 | 1060 | { |
… |
… |
process_ip_header (struct context *c, unsigned int flags, struct buffer *buf) |
1060 | 1062 | if (dhcp_router) |
1061 | 1063 | route_list_add_vpn_gateway (c->c1.route_list, c->c2.es, dhcp_router); |
1062 | 1064 | } |
| 1065 | #endif |
1063 | 1066 | } |
1064 | 1067 | else if (is_ipv6 (TUNNEL_TYPE (c->c1.tuntap), &ipbuf)) |
1065 | 1068 | { |
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 23af272..8cfd887 100644
a
|
b
|
show_settings (const struct options *o) |
1521 | 1521 | SHOW_INT (route_delay_window); |
1522 | 1522 | SHOW_BOOL (route_delay_defined); |
1523 | 1523 | SHOW_BOOL (route_nopull); |
| 1524 | #ifdef ENABLE_EXTRACT_DHCP_ROUTER |
1524 | 1525 | SHOW_BOOL (route_gateway_via_dhcp); |
| 1526 | #endif |
1525 | 1527 | SHOW_INT (max_routes); |
1526 | 1528 | SHOW_BOOL (allow_pull_fqdn); |
1527 | 1529 | if (o->routes) |
… |
… |
add_option (struct options *options, |
5174 | 5176 | VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS); |
5175 | 5177 | if (streq (p[1], "dhcp")) |
5176 | 5178 | { |
| 5179 | #ifdef ENABLE_EXTRACT_DHCP_ROUTER |
5177 | 5180 | options->route_gateway_via_dhcp = true; |
| 5181 | #endif |
5178 | 5182 | } |
5179 | 5183 | else |
5180 | 5184 | { |
diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h
index 4db29cc..4f85023 100644
a
|
b
|
socket_defined (const socket_descriptor_t sd) |
720 | 720 | #define ENABLE_CLIENT_NAT |
721 | 721 | |
722 | 722 | /* |
| 723 | * Do we extract DHCP routers? |
| 724 | */ |
| 725 | #define ENABLE_EXTRACT_DHCP_ROUTER |
| 726 | |
| 727 | /* |
723 | 728 | * Enable --memstats option |
724 | 729 | */ |
725 | 730 | #ifdef TARGET_LINUX |