From patchwork Sat Jul 26 13:51:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4329 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:3644:b0:671:5a2c:6455 with SMTP id a4csp2088366mai; Sat, 26 Jul 2025 06:52:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU9K7HiRZ486fYxJvj93XwWX0Xzv5WPhxgi5Bu2FpQHue90bdSQdyNEU1qv6ZmwFbcK2WigzQCywUQ=@openvpn.net X-Google-Smtp-Source: AGHT+IFxGai5Uj1Vz5ei/LLCqi7+KAs+TUnUJiS8av/9qmrrdqfcgNfjjzt1tiJXgGNbWLmGBNcY X-Received: by 2002:a05:6808:1b0f:b0:40a:f3d0:cef7 with SMTP id 5614622812f47-42bb74eb0b7mr3101623b6e.7.1753537935954; Sat, 26 Jul 2025 06:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1753537935; cv=none; d=google.com; s=arc-20240605; b=ZaPam54dhz72I3tRUa87jrTiyu7oES+PS4HZrPktAza2klIjkHigdC4se3HCz0YcmG P2l9MEcecrYKv2yecyzKffZuvM9SqEtIYPY0YX30u4cAAKLclore4hgHke2/VE07Ab7/ BuuaKpr694mCuPwBLGW16YdBUFH5mb6UAs4bfOEjjgktcLrlQNM/1tlMnerB3X4c/4SW DT58i1afrapubUmJriJMlGn3sbF/N/yu2WIKKx9jiRK4h57iR+v+9NJmib6uAPI55fT4 y7K20ZzeuzKVJkDUhDn/dFdxGaZxpJapgcvc6+k9KVad051hBLDdDHVKXybovr0rsECE xagA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=BJ0B4G9po4h0eYknd6XhghVjvDLJG0o1xysy6kJBWyY=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=LtvOUdqj+vWlsQm/FZiKzKoONptQQQo4FT3QJg6rj5C/apjqopwsYD0zScUlyMCZ1+ fC96FPsr8waqTlCE/HS3hgDWWesnCq0UhdPhzVC+g2CitVPttkwk6uK8nZRlZ1C16t/8 5KM2NlsZg63dpLae4siSB3ZI9PUsZbARb58PcsSXH9eqUJ+UuHIkE5+YBfg/22ju/Ptt WI2CzWZljR9zR+IIghT9W2kJfzwVn0TSIVkkkr+3QzLtZJlrxyYoFYq0KiUtX4GfQcVN esX70Z6NJE4Ju4zlFPLkumeyVQw/jo4kS1j/N8Hsau5QGj2Gs3im8SeJcGtOQPq8O4qO G7QQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=NwfRFkLz; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="O/dgokPA"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=PTi2sxPh; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 006d021491bc7-6191404de22si743001eaf.66.2025.07.26.06.52.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Jul 2025 06:52:15 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=NwfRFkLz; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="O/dgokPA"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=PTi2sxPh; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BJ0B4G9po4h0eYknd6XhghVjvDLJG0o1xysy6kJBWyY=; b=NwfRFkLz4B+re71jsS4huieNc1 6A8msAiobM8A8rB05acw/ja3NIY8udjtKIVUxBqol5jH02Ve9bGmHMnkUorVJMlo5e0v74VCQh/v6 WM3p7QlEyQWZlALbjerVIpd50VVz4vH0NheoVyrpU7eTH0CHBs6EJ+MIgCxSKY0Yg7qw=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1uffJt-0005Yh-G9; Sat, 26 Jul 2025 13:52:13 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uffJs-0005Ya-AW for openvpn-devel@lists.sourceforge.net; Sat, 26 Jul 2025 13:52:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MFFnA+Ge+OcPCYkVCxtufZVwbi2UNH50BCJBRdVRCHg=; b=O/dgokPASYQB5b86rXkNo6SW2U RcVDCJNsJuL5cRgnFePBX0D5j51mqrzqq95euLKTiAAqDKtosw6fJtTZ/7h1kqcBM5GSZ10ysPJyn IHOBmjO9MXcQSZBp+RYEWjUAE5eNJHq313/KAFeTAdT5jmda6QatTzEEQdR5vWY2CdCg=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MFFnA+Ge+OcPCYkVCxtufZVwbi2UNH50BCJBRdVRCHg=; b=PTi2sxPhJR18Zw9+MniVKyrIwJ +UliWHOi6BJu7Vrb81cPlVe+JqauAbcbU7qlJhiH/bJV1svdFdcXQU+g06ZjQONb/Y/vP4j0WkNe4 YDxHJl/9PtQww7rokT5vYpqa4NBw9StbaWrY+526Pe1GR9tkSWWNebxkCWaas/4hJUXY=; Received: from [193.149.48.143] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1uffJr-0003JG-63 for openvpn-devel@lists.sourceforge.net; Sat, 26 Jul 2025 13:52:12 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 56QDq30d003486 for ; Sat, 26 Jul 2025 15:52:03 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 56QDq34F003485 for openvpn-devel@lists.sourceforge.net; Sat, 26 Jul 2025 15:52:03 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sat, 26 Jul 2025 15:51:56 +0200 Message-ID: <20250726135203.3452-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Antonio Quartulli 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. Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URI: openvpn.net] 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1uffJr-0003JG-63 Subject: [Openvpn-devel] [PATCH v2] multi: make some multi_*() functions static X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1838717794875172130?= X-GMAIL-MSGID: =?utf-8?q?1838717794875172130?= From: Antonio Quartulli 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 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1115 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index c5691ff..c90ed5b 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, const 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 *mi, - 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 unsigned 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,