From: "cron2 (Code Review)" Date: Fri, 27 Sep 2024 16:49:56 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277..., a@...2181... Message-ID: <560aba46e23399b31ca47d5cd8764383469bafa0-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="6+1XIcoy7o4="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: dco: better naming for function parameters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: stipa , plaisthos , flichtenheld Cc: openvpn-devel --6+1XIcoy7o4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#5) to the change originally created by= stipa. ( http://gerrit.openvpn.net/c/openvpn/+/769?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by ordex Change subject: dco: better naming for function parameters ...................................................................... dco: better naming for function parameters Current naming (remote_in4/6) is confusing, since those are in fact VPN IPv4/v6 addresses and not related to remote at all. Change-Id: I101bbc9f682375ec733bca10b52da82f0abfec27 Signed-off-by: Lev Stipakov Acked-by: Antonio Quartulli Message-Id: <20240927093045.22753-1-frank@...2641...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29= 460.html Signed-off-by: Gert Doering --- M src/openvpn/dco_freebsd.c M src/openvpn/dco_internal.h M src/openvpn/dco_linux.c M src/openvpn/dco_win.c 4 files changed, 13 insertions(+), 13 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/69/769/5 diff --git a/src/openvpn/dco_freebsd.c b/src/openvpn/dco_freebsd.c index 9a90f5c..c92e42a 100644 --- a/src/openvpn/dco_freebsd.c +++ b/src/openvpn/dco_freebsd.c @@ -75,7 +75,7 @@ int dco_new_peer(dco_context_t *dco, unsigned int peerid, int sd, struct sockaddr *localaddr, struct sockaddr *remoteaddr, - struct in_addr *remote_in4, struct in6_addr *remote_in6) + struct in_addr *vpn_ipv4, struct in6_addr *vpn_ipv6) { struct ifdrv drv; nvlist_t *nvl; @@ -95,15 +95,15 @@ nvlist_add_nvlist(nvl, "remote", sockaddr_to_nvlist(remoteaddr)); } - if (remote_in4) + if (vpn_ipv4) { - nvlist_add_binary(nvl, "vpn_ipv4", &remote_in4->s_addr, - sizeof(remote_in4->s_addr)); + nvlist_add_binary(nvl, "vpn_ipv4", &vpn_ipv4->s_addr, + sizeof(vpn_ipv4->s_addr)); } - if (remote_in6) + if (vpn_ipv6) { - nvlist_add_binary(nvl, "vpn_ipv6", remote_in6, sizeof(*remote_in6)= ); + nvlist_add_binary(nvl, "vpn_ipv6", vpn_ipv6, sizeof(*vpn_ipv6)); } nvlist_add_number(nvl, "fd", sd); diff --git a/src/openvpn/dco_internal.h b/src/openvpn/dco_internal.h index 624c110..4bbcc82 100644 --- a/src/openvpn/dco_internal.h +++ b/src/openvpn/dco_internal.h @@ -62,7 +62,7 @@ int dco_new_peer(dco_context_t *dco, unsigned int peerid, int sd, struct sockaddr *localaddr, struct sockaddr *remoteaddr, - struct in_addr *remote_in4, struct in6_addr *remote_in6); + struct in_addr *vpn_ipv4, struct in6_addr *vpn_ipv6); int dco_del_peer(dco_context_t *dco, unsigned int peerid); diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index 277cd64..b038382 100644 --- a/src/openvpn/dco_linux.c +++ b/src/openvpn/dco_linux.c @@ -220,7 +220,7 @@ int dco_new_peer(dco_context_t *dco, unsigned int peerid, int sd, struct sockaddr *localaddr, struct sockaddr *remoteaddr, - struct in_addr *remote_in4, struct in6_addr *remote_in6) + struct in_addr *vpn_ipv4, struct in6_addr *vpn_ipv6) { struct gc_arena gc =3D gc_new(); const char *remotestr =3D "[undefined]"; @@ -263,14 +263,14 @@ } /* Set the primary VPN IP addresses of the peer */ - if (remote_in4) + if (vpn_ipv4) { - NLA_PUT_U32(nl_msg, OVPN_NEW_PEER_ATTR_IPV4, remote_in4->s_addr); + NLA_PUT_U32(nl_msg, OVPN_NEW_PEER_ATTR_IPV4, vpn_ipv4->s_addr); } - if (remote_in6) + if (vpn_ipv6) { NLA_PUT(nl_msg, OVPN_NEW_PEER_ATTR_IPV6, sizeof(struct in6_addr), - remote_in6); + vpn_ipv6); } nla_nest_end(nl_msg, attr); diff --git a/src/openvpn/dco_win.c b/src/openvpn/dco_win.c index 892c616..9224bca 100644 --- a/src/openvpn/dco_win.c +++ b/src/openvpn/dco_win.c @@ -247,7 +247,7 @@ int dco_new_peer(dco_context_t *dco, unsigned int peerid, int sd, struct sockaddr *localaddr, struct sockaddr *remoteaddr, - struct in_addr *remote_in4, struct in6_addr *remote_in6) + struct in_addr *vpn_ipv4, struct in6_addr *vpn_ipv6) { msg(D_DCO_DEBUG, "%s: peer-id %d, fd %d", __func__, peerid, sd); return 0; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/769?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I101bbc9f682375ec733bca10b52da82f0abfec27 Gerrit-Change-Number: 769 Gerrit-PatchSet: 5 Gerrit-Owner: stipa Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: ordex Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --6+1XIcoy7o4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #5 to the change originally cr= eated by stipa.

View Change

The following approvals got outdated and= were removed: Code-Review+2 by ordex

dco: better naming for function parameters

Cu= rrent naming (remote_in4/6) is confusing, since
those are in fact VPN IP= v4/v6 addresses and not
related to remote at all.

Change-Id: I101= bbc9f682375ec733bca10b52da82f0abfec27
Signed-off-by: Lev Stipakov <le= v@...515...>
Acked-by: Antonio Quartulli <a@...2181...>
Mess= age-Id: <20240927093045.22753-1-frank@...2641...>
URL: https://www= .mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29460.html
Sign= ed-off-by: Gert Doering <gert@...1296...>
---
M src/openvpn/dco= _freebsd.c
M src/openvpn/dco_internal.h
M src/openvpn/dco_linux.c
= M src/openvpn/dco_win.c
4 files changed, 13 insertions(+), 13 deletions(= -)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/6=
9/769/5
diff --git a/src/openvpn/dco_freebsd.c b/src/openvpn/dco_fr=
eebsd.c
index 9a90f5c..c92e42a 100644
--- a= /src/openvpn/dco_freebsd.c
+++ b/src/openvpn/dco_freebsd.c<= /span>
@@ -75,7 +75,7 @@
int
dco= _new_peer(dco_context_t *dco, unsigned int peerid, int sd,
= struct sockaddr *localaddr, struct sockaddr *remoteaddr,
- struct in_add= r *remote_in4, struct in6_addr *remote_in6)
+ struct in_addr *vpn_ipv4, struct in6_a= ddr *vpn_ipv6)
{
struct ifdrv drv;
nvlist_t *nvl;
@@ -95,15 +95,15 @@
nvlist_add_nvlist(nvl, "remote", sockaddr_to_= nvlist(remoteaddr));
}

- if (remote_in4)

+ if (vpn_ipv4)

= {
- nvlist_a= dd_binary(nvl, "vpn_ipv4", &remote_in4->s_addr,
= - sizeof= (remote_in4->s_addr));
+ nvlist_add_binary(nvl, "vpn_ipv4", &vpn_ipv4-&g= t;s_addr,
+ = sizeof(vpn_ipv4->s_addr));
}=

- if (re= mote_in6)
+ if (vp= n_ipv6)
{
- nvlist_add_binary(nvl, "vpn_ipv6", remote_in6, s= izeof(*remote_in6));
= + nvlist_add_binary(nvl, "vpn_ipv6", vpn_ipv6, sizeof(*vpn= _ipv6));
}

nvli= st_add_number(nvl, "fd", sd);
diff --git a/src/op= envpn/dco_internal.h b/src/openvpn/dco_internal.h
index 624= c110..4bbcc82 100644
--- a/src/openvpn/dco_internal.h
+++ b/src/openvpn/dco_internal.h
@@ -62,7 +62,7 = @@

int dco_new_peer(dco_context_t *dco, = unsigned int peerid, int sd,
struct socka= ddr *localaddr, struct sockaddr *remoteaddr,
- struct in_addr *remote_in4, struct = in6_addr *remote_in6);
- struct in_addr *remote_in4, struct in6_addr *remote_in6)
+ struct i= n_addr *vpn_ipv4, struct in6_addr *vpn_ipv6)
{
<= span> struct gc_arena gc =3D gc_new();

const char = *remotestr =3D "[undefined]";
@@ -263,14 +263,14 = @@
}

/* Set the= primary VPN IP addresses of the peer */
- if (remote_in4)
+ if (vpn_ipv4)
{
- NLA_PUT_U32(nl_msg, OVPN_NEW_= PEER_ATTR_IPV4, remote_in4->s_addr);

+ NLA_PUT_U32(nl_msg, OVPN_NEW_PEER_ATTR_IPV4, vp= n_ipv4->s_addr);
}
- if (remote_in6)
+ if (vpn_ipv6)
{
NLA_PUT(nl_msg, OVPN_NEW_PEER_ATTR_IPV6, sizeof(struct in6_addr= ),

- rem= ote_in6);
+ = vpn_ipv6);
}
nla_nest_end(n= l_msg, attr);

diff --git a/src/openvpn/dc= o_win.c b/src/openvpn/dco_win.c
index 892c616..9224bca 1006= 44
--- a/src/openvpn/dco_win.c
+++ b/src/op= envpn/dco_win.c
@@ -247,7 +247,7 @@
int
dco_new_peer(dco_context_t *dco, unsigned int peerid, int sd= ,
struct sockaddr *localaddr, struct sockaddr= *remoteaddr,
- = struct in_addr *remote_in4, struct in6_addr *remote_in6)
+ struct in_addr *vpn_= ipv4, struct in6_addr *vpn_ipv6)

{
ms= g(D_DCO_DEBUG, "%s: peer-id %d, fd %d", __func__, peerid, sd);
return 0;

To view, v= isit chan= ge 769. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I101bbc9f682375ec733bca10b52= da82f0abfec27
Gerrit-Change-Number: 769
Gerrit-PatchSet: 5
Gerrit-Owner: stipa <lstipakov@...277...>= ;
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: ordex <a@...2181...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--6+1XIcoy7o4=--