Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/898?usp=email
to review the following change.
Change subject: get_dafault_gateway(): Make sure the get_default_gateway()
function never receives IPV4_INVALID_ADDR as a destination.
......................................................................
get_dafault_gateway(): Make sure the get_default_gateway() function never
receives IPV4_INVALID_ADDR as a destination.
Change-Id: I02afe6817433ca21aae76671c35151ec6a066933
Signed-off-by: Marco Baffo <[email protected]>
---
M src/openvpn/options.c
M src/openvpn/route.c
2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/98/898/1
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 218d8a6..8b7fee4 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -5872,7 +5872,7 @@
get_ipv6_addr(p[1], &remote_ipv6, NULL, M_WARN);
}
net_ctx_init(NULL, &net_ctx);
- get_default_gateway(&rgi, remote_ipv4, &net_ctx);
+ get_default_gateway(&rgi, remote_ipv4 != IPV4_INVALID_ADDR ?
remote_ipv4 : INADDR_ANY, &net_ctx);
get_default_gateway_ipv6(&rgi6, &remote_ipv6, &net_ctx);
print_default_gateway(M_INFO, &rgi, &rgi6);
openvpn_exit(OPENVPN_EXIT_STATUS_GOOD); /* exit point */
diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index d895e1c..bc41492 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -655,7 +655,7 @@
rl->spec.flags |= RTSA_DEFAULT_METRIC;
}
- get_default_gateway(&rl->rgi, remote_host, ctx);
+ get_default_gateway(&rl->rgi, remote_host != IPV4_INVALID_ADDR ?
remote_host : INADDR_ANY, ctx);
if (rl->rgi.flags & RGI_ADDR_DEFINED)
{
setenv_route_addr(es, "net_gateway", rl->rgi.gateway.addr, -1);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/898?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I02afe6817433ca21aae76671c35151ec6a066933
Gerrit-Change-Number: 898
Gerrit-PatchSet: 1
Gerrit-Owner: mrbff <[email protected]>
Gerrit-Reviewer: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel