@@ -6337,7 +6337,14 @@ add_option(struct options *options,
/* we need this here to handle pushed --redirect-gateway */
remap_redirect_gateway_flags(options);
#endif
- options->routes->flags |= RG_ENABLE;
+ /* enable IPv4 redirection logic only if at least one IPv4 flag is set.
+ * For instance, when "redirect-gateway !ipv4 ipv6" is specified no
+ * IPv4 redirection should be activated.
+ */
+ if (options->routes->flags)
+ {
+ options->routes->flags |= RG_ENABLE;
+ }
}
else if (streq(p[0], "remote-random-hostname") && !p[1])
{
@@ -1174,9 +1174,9 @@ add_routes(struct route_list *rl, struct route_ipv6_list *rl6, const struct tunt
if (rl->routes && !tt->did_ifconfig_setup)
{
msg(M_INFO, "WARNING: OpenVPN was configured to add an IPv4 "
- "route over %s. However, no IPv4 has been configured for "
+ "route. However, no IPv4 has been configured for "
"this interface, therefore the route installation may "
- "fail or may not work as expected.", tt->actual_name);
+ "fail or may not work as expected.");
}
#ifdef ENABLE_MANAGEMENT
@@ -1210,9 +1210,9 @@ add_routes(struct route_list *rl, struct route_ipv6_list *rl6, const struct tunt
if (!tt->did_ifconfig_ipv6_setup)
{
msg(M_INFO, "WARNING: OpenVPN was configured to add an IPv6 "
- "route over %s. However, no IPv6 has been configured for "
+ "route. However, no IPv6 has been configured for "
"this interface, therefore the route installation may "
- "fail or may not work as expected.", tt->actual_name);
+ "fail or may not work as expected.");
}
for (r = rl6->routes_ipv6; r; r = r->next)