From patchwork Fri Sep 12 13:15:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 4409 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:b149:b0:671:5a2c:6455 with SMTP id s9csp3798550maw; Fri, 12 Sep 2025 06:15:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWPEdzfLPqw07+wa1Ss4+R2La4Cx+8aYIL0FNhLhfaCg07boLeP2W6GTyTFUzCMHvvdE62CpaM0IAo=@openvpn.net X-Google-Smtp-Source: AGHT+IHSQkKTxnC0QLuHHoMCX4mYU/C1Kv5U8363+Jytz23tu1gUI6NLsgJixt0JTYJ74nblQGtU X-Received: by 2002:a05:6808:11cf:b0:438:3d22:a604 with SMTP id 5614622812f47-43b7bbd8a6emr3131553b6e.17.1757682934844; Fri, 12 Sep 2025 06:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1757682934; cv=none; d=google.com; s=arc-20240605; b=IgbprNfgnypgFu9hPZmsizoQD+84x6FTlzO7/rDem1kmyLMejv+mjIuN8dVlSYOkx1 elo03qMnD5NGR3I8rZ50rcuS3gEJ90E0UvCuoQXSJhLFz1vXz7J7KJSs/ZBV3OxzhYSI Zd1R9bbdHhvlvUxUSQW8G3x4E0dU+6wriGd9ZEgkdEQttH7F2cZG/prP6OxnCtskZb0t gNOIBekNwi7L7lhGjncmsUJ/n+qIJiYvL2zcjzlN/Ud6ULgBAz1pcMZk+2+Nv21dbufm FLxJRK29NdPDm+uV+o2AnKbNMife998j1nmEkQOWfiacvQdElO7Bw0UTeFP+GYjLgrKP zoaA== 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:dkim-signature; bh=FLn7c/Z9RbZ6zRXuyPKpa3hlUBcqHr+JDIHdQdL0x0s=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=BmDYdl8homul2g7nUwpQMKOyvOarCFwudx1BJWeZEpQ0EBO8SZSdz4UKRNFo3s7ZFP 4yCwG4pDhAUVhgew9Gu1wuxfM4pspPNSel5o1irWP1TNw95W9WBQCMCipcXd0NktAE0Y LJ+ey1TGarvoReQoFVwnjQq/NzXlZzV9VS1Slfr8JqXlElRYYfKgLVASXV8WBAP7aTdr qbFbL2w5KTOg/Obdn+l5+NWBcsx1QU20vilIpUaogDYO+v6mLaubGKmnNnLz5EYEaWpK anwpHUWyB/D+1BKWo0aohGO6mxTuGhwAurM0/lZAiH1LvR4mYNH5QmvMgG00dlXGtTWG DHSg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=JpYoyz+q; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="doMz8r/U"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XGSCjiEQ; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=TOVwKL6C; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5614622812f47-43b8ddac1e9si508480b6e.195.2025.09.12.06.15.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Sep 2025 06:15:34 -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=JpYoyz+q; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="doMz8r/U"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XGSCjiEQ; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=TOVwKL6C; 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 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=FLn7c/Z9RbZ6zRXuyPKpa3hlUBcqHr+JDIHdQdL0x0s=; b=JpYoyz+qM+sNx2n7tlfRFtckVd uadKJ0REM77wiq4L1DEwMAI3N5fsadkyiH7LD1ZzrAK03KvXH894NFKxWmdBCIvYh5/Q1lpcKttSO fT/IXNtaEa6NUoYsIb9IE6hiIblWXsmaScNeKgssi1MAK4rhk6bdRCKp4kUSyynW6EGQ=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1ux3ci-0006xc-7B; Fri, 12 Sep 2025 13:15:32 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ux3cg-0006xV-CP for openvpn-devel@lists.sourceforge.net; Fri, 12 Sep 2025 13:15:30 +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:Cc:To:From:Sender:Reply-To: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=zXQPBxp3AN8lqGMStMm6OV5kidupQwFFkytQFSVdaec=; b=doMz8r/UNaI1397w2khQUsSkEH pD1s76cd0sP/R171rDMZG1HDIm/YMmXBmyHzTw1MhXPu2+WFzF2nLpeOL5TwIgvQAVX/cIH82EImI umBRnpomBhzAwfzscIYTHHfgCj5f/mOdwiQP7PnYQGDZbC7H0jLnHtOQ1k+7Up9O4n4U=; 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:Cc:To:From:Sender:Reply-To: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=zXQPBxp3AN8lqGMStMm6OV5kidupQwFFkytQFSVdaec=; b=XGSCjiEQEIrnZqAM27w+OpapN5 Oa6tFNkb1wnl16Cak/23RAOEKAK/uhWo6TsLKSMhkIyy5zw+umxcDs6+UOUG3rMsfklGWPhWS+mYB aPnUStNobVa0YGEAMVXBuGhYmzGrfaQFMG29dpAM0GS+5wnA6HOhs4ltn7+9JOdR2tt4=; Received: from mout-p-101.mailbox.org ([80.241.56.151]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1ux3ce-00012F-Ox for openvpn-devel@lists.sourceforge.net; Fri, 12 Sep 2025 13:15:30 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4cNZfc2PQpz9tPy; Fri, 12 Sep 2025 15:15:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1757682920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zXQPBxp3AN8lqGMStMm6OV5kidupQwFFkytQFSVdaec=; b=TOVwKL6C0arf9qyR/4+qs9pD0Z86CCKk7eAbqLHBT/v/+8r/RAqxGA/OH9+x0cc5TCLU45 amJ/dEgN26CgfBZhXkohK6WA8nh0fmsLGGDlwYsTRYrx+yjYFOAQvpE+rhsSCGO3F4t8UF 6bx/wlE7tzJWelTXqt4qSLLigMdU012hLaYJUi2o5sim6yT6xDmeyc7QJC2vVl76E62f1U ho3ReYRfMg0trmLJkEeGfI7qTKGnKhH7pbVNrHX9TOuLfD06lTr7GKV1p6UlBlPpTcAYjM 5biOJKRT4/ho134EsfuCB2vqnyd6VQPUzZEGTxJZYYZ5hzQJ68Z2WzU6LDI8aA== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 12 Sep 2025 15:15:19 +0200 Message-Id: <20250912131519.43222-1-frank@lichtenheld.com> In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.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: Marco Baffo Change-Id: I73f8ad9bf105920f4bde357ea9dcf0e485f3f3cb Signed-off-by: Marco Baffo Acked-by: Frank Lichtenheld --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1ux3ce-00012F-Ox Subject: [Openvpn-devel] [PATCH v3] push-update-server: comment about buf_string_compare_advance() usage in send_single_push_update() 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?1843064141485079997?= X-GMAIL-MSGID: =?utf-8?q?1843064141485079997?= From: Marco Baffo Change-Id: I73f8ad9bf105920f4bde357ea9dcf0e485f3f3cb Signed-off-by: Marco Baffo Acked-by: Frank Lichtenheld --- 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/+/1177 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpn/push_util.c b/src/openvpn/push_util.c index bd3992b..f7a4fca 100644 --- a/src/openvpn/push_util.c +++ b/src/openvpn/push_util.c @@ -161,6 +161,10 @@ * will not be routed towards the client. * For the same reason we later update the vhash too in * `send_push_update()` function. + * Using `buf_string_compare_advance()` we mimic the behavior + * inside `process_incoming_push_msg()`. However, we don't need + * to check the return value here because we just want to `advance`, + * meaning we skip the `push_update_cmd' we added earlier. */ buf_string_compare_advance(&msgs[i], push_update_cmd); if (process_incoming_push_update(c, pull_permission_mask(c), option_types_found, &msgs[i], true) == PUSH_MSG_ERROR)