[Openvpn-devel,v101,7/7] dco: properly name variables
Commit Message
renamed remote_addrX variables to vpn_addrX to make it clear that they
refer to the address over the VPN/tunnel
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
src/openvpn/dco.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
Comments
Acked-by: Gert Doering <gert@greenie.muc.de>
Thanks for that. This really helps understanding which address is which.
Mechanical rename, so "trivial", but still tested on the Linux DCO test rig :-)
Interesting enough, uncrustify did not catch this whitespace error
+ vpn_ip4.s_addr = htonl(c->c2.push_ifconfig_local);
"two blanks before htonl()" -> fixed.
Your patch has been applied to the master branch.
commit cea978bcb60a3b18be6d227466702fb14d6bc490
Author: Antonio Quartulli
Date: Sat Aug 13 22:42:24 2022 +0200
dco: properly name variables
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220813204224.22576-7-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24916.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
@@ -561,19 +561,20 @@ dco_multi_add_new_peer(struct multi_context *m, struct multi_instance *mi)
remoteaddr = &c->c2.link_socket_info->lsa->actual.dest.addr.sa;
}
- struct in_addr remote_ip4 = { 0 };
- struct in6_addr *remote_addr6 = NULL;
- struct in_addr *remote_addr4 = NULL;
-
/* In server mode we need to fetch the remote addresses from the push config */
+
+ struct in_addr vpn_ip4 = { 0 };
+ struct in_addr *vpn_addr4 = NULL;
if (c->c2.push_ifconfig_defined)
{
- remote_ip4.s_addr = htonl(c->c2.push_ifconfig_local);
- remote_addr4 = &remote_ip4;
+ vpn_ip4.s_addr = htonl(c->c2.push_ifconfig_local);
+ vpn_addr4 = &vpn_ip4;
}
+
+ struct in6_addr *vpn_addr6 = NULL;
if (c->c2.push_ifconfig_ipv6_defined)
{
- remote_addr6 = &c->c2.push_ifconfig_ipv6_local;
+ vpn_addr6 = &c->c2.push_ifconfig_ipv6_local;
}
if (dco_multi_get_localaddr(m, mi, &local))
@@ -582,7 +583,7 @@ dco_multi_add_new_peer(struct multi_context *m, struct multi_instance *mi)
}
int ret = dco_new_peer(&c->c1.tuntap->dco, peer_id, sd, localaddr,
- remoteaddr, remote_addr4, remote_addr6);
+ remoteaddr, vpn_addr4, vpn_addr6);
if (ret < 0)
{
return ret;