From: "cron2 (Code Review)" Date: Sat, 26 Jul 2025 15:16:22 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., antonio@...2726... Message-ID: <5e2e23214b33f5ee51708263e6f1ea6045495a5a-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="6Bis0YcCSQg="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: multi: make some multi_*() functions static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --6Bis0YcCSQg= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#3) to the change originally created by= ordex. ( http://gerrit.openvpn.net/c/openvpn/+/1115?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: multi: make some multi_*() functions static ...................................................................... multi: make some multi_*() functions static multi_process_float() and multi_print_status() are both invoked only within multi.c, which is where they is defined. For this reason we can make them static and drop their declaration from multi.h. Change-Id: Id5e06f0822a3e7e4ad1b6f93caaefdb6a8cfe547 Signed-off-by: Antonio Quartulli Acked-by: Gert Doering Message-Id: <20250726135203.3452-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32= 356.html Signed-off-by: Gert Doering --- M src/openvpn/multi.c M src/openvpn/multi.h 2 files changed, 10 insertions(+), 15 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/15/1115/3 diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index a62c57a..8de5854 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -849,7 +849,7 @@ * If status file is defined, write to file. * If status file is NULL, write to syslog. */ -void +static void multi_print_status(struct multi_context *m, struct status_output *so, cons= t int version) { if (m->hash) @@ -3210,7 +3210,15 @@ return ret; } -void +/** + * Handles peer floating. + * + * If peer is floated to a taken address, either drops packet + * (if peer that owns address has different CN) or disconnects + * existing peer. Updates multi_instance with new address, + * updates hashtables in multi_context. + */ +static void multi_process_float(struct multi_context *m, struct multi_instance *mi, struct link_socket *sock) { diff --git a/src/openvpn/multi.h b/src/openvpn/multi.h index 8b2704c..3c821d7 100644 --- a/src/openvpn/multi.h +++ b/src/openvpn/multi.h @@ -270,17 +270,6 @@ bool multi_process_timeout(struct multi_context *m, const unsigned int mpp= _flags); -/** - * Handles peer floating. - * - * If peer is floated to a taken address, either drops packet - * (if peer that owns address has different CN) or disconnects - * existing peer. Updates multi_instance with new address, - * updates hashtables in multi_context. - */ -void multi_process_float(struct multi_context *m, struct multi_instance *m= i, - struct link_socket *sock); - #define MPP_PRE_SELECT (1<<0) #define MPP_CONDITIONAL_PRE_SELECT (1<<1) #define MPP_CLOSE_ON_SIGNAL (1<<2) @@ -370,8 +359,6 @@ void multi_process_drop_outgoing_tun(struct multi_context *m, const unsign= ed int mpp_flags); -void multi_print_status(struct multi_context *m, struct status_output *so,= const int version); - struct multi_instance *multi_get_queue(struct mbuf_set *ms); void multi_add_mbuf(struct multi_context *m, -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1115?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: Id5e06f0822a3e7e4ad1b6f93caaefdb6a8cfe547 Gerrit-Change-Number: 1115 Gerrit-PatchSet: 3 Gerrit-Owner: ordex Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --6Bis0YcCSQg= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #3 to the change originally cr= eated by ordex.

View Change

The following approvals got outdated an= d were removed: Code-Review+2 by cron2

multi: make some multi_*() functions static

m= ulti_process_float() and multi_print_status() are both invoked only
with= in multi.c, which is where they is defined.

For this reason we can m= ake them static and drop their declaration
from multi.h.

Change-I= d: Id5e06f0822a3e7e4ad1b6f93caaefdb6a8cfe547
Signed-off-by: Antonio Quar= tulli <antonio@...2726...>
Acked-by: Gert Doering <gert@...1726...= ...>
Message-Id: <20250726135203.3452-1-gert@...1296...>
URL= : https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32356= .html
Signed-off-by: Gert Doering <gert@...1296...>
---
M sr= c/openvpn/multi.c
M src/openvpn/multi.h
2 files changed, 10 insertion= s(+), 15 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/ope=
nvpn refs/changes/15/1115/3
diff --git a/src/openvpn/multi.c b/src/=
openvpn/multi.c
index a62c57a..8de5854 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -849,7 +849,7 @@
* If status file is defin= ed, write to file.
* If status file is NULL, write to sys= log.
*/
-void
+static void=
multi_print_status(struct multi_context *m, struct status= _output *so, const int version)
{
if = (m->hash)
@@ -3210,7 +3210,15 @@
re= turn ret;
}

-void
+/**
+ * Han= dles peer floating.
+= *
+ * If peer is flo= ated to a taken address, either drops packet
+ * (if peer that owns address has different CN) or= disconnects
+ * exis= ting peer. Updates multi_instance with new address,
+ * updates hashtables in multi_context.
+ */
+static void
multi_pr= ocess_float(struct multi_context *m, struct multi_instance *mi,
<= span> struct link_socket *sock)

{
diff --git a/src/openvpn/multi.h b/src/openvpn/multi.hindex 8b2704c..3c821d7 100644
--- a/src/openvpn/mul= ti.h
+++ b/src/openvpn/multi.h
@@ -270,17 += 270,6 @@

bool multi_process_timeout(stru= ct multi_context *m, const unsigned int mpp_flags);

-/**
- * Handles peer floating.
- *
- * If peer is floated to a taken address, either drops pac= ket
- * (if peer that o= wns address has different CN) or disconnects
- * existing peer. Updates multi_instance with new ad= dress,
- * updates hash= tables in multi_context.
-void multi_proc= ess_float(struct multi_context *m, struct multi_instance *mi,
- struct lin= k_socket *sock);

-
#define MPP_PRE_SELECT (1<<0)
#define MPP_CONDITIONAL_PRE_SELECT (1<<1)

#define= MPP_CLOSE_ON_SIGNAL (1<<2)
@@ -370,8 +359,6 @= @

void multi_process_drop_outgoing_tun(s= truct multi_context *m, const unsigned int mpp_flags);

-void multi_print_status(= struct multi_context *m, struct status_output *so, const int version);
-
struct m= ulti_instance *multi_get_queue(struct mbuf_set *ms);

void multi_add_mbuf(struct multi_context *m,
<= /span>

To view, visit change 1115. To unsubscribe, or for help writ= ing mail filters, visit sett= ings.

<= link itemprop=3D"url" href=3D"http://gerrit.openvpn.net/c/openvpn/+/1115?us= p=3Demail"/>
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id5e06f0822a3e7e4ad1b6f93caa= efdb6a8cfe547
Gerrit-Change-Number: 1115
Gerrit-PatchSet: 3
Gerrit-Owner: ordex <antonio@...2726...>=
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--6Bis0YcCSQg=--