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/+/737?usp=email
to review the following change.
Change subject: Fix check_addr_clash argument order
......................................................................
Fix check_addr_clash argument order
In init_tun() make sure to pass the --local and --remote addresses in
the host order so that they can be compared to the --ifconfig addresses.
Change-Id: I5adbe0a79f078221c4bb5f3d39391a81b4d8adce
Signed-off-by: Ralf Lici <[email protected]>
---
M src/openvpn/tun.c
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/37/737/1
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index 739e008..1cd6ad2 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -877,9 +877,10 @@
{
if (curele->ai_family == AF_INET)
{
+ const in_addr_t local = ntohl(((struct sockaddr_in
*)curele->ai_addr)->sin_addr.s_addr);
check_addr_clash("local",
tt->type,
- ((struct sockaddr_in
*)curele->ai_addr)->sin_addr.s_addr,
+ local,
tt->local,
tt->remote_netmask);
}
@@ -889,9 +890,10 @@
{
if (curele->ai_family == AF_INET)
{
+ const in_addr_t remote = ntohl(((struct sockaddr_in
*)curele->ai_addr)->sin_addr.s_addr);
check_addr_clash("remote",
tt->type,
- ((struct sockaddr_in
*)curele->ai_addr)->sin_addr.s_addr,
+ remote,
tt->local,
tt->remote_netmask);
}
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/737?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: I5adbe0a79f078221c4bb5f3d39391a81b4d8adce
Gerrit-Change-Number: 737
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[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