From patchwork Sun Oct 11 20:24:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5459 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:32d1:b0:8d1:cccb:4552 with SMTP id y17csp5638237mad; Sun, 11 Oct 2026 13:25:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBzBq/7One84+3aGLQXetu44q+WwWABvGi4yA3o35qLvHK7kQd5JTJMwWLnNduCxuCXnVYZnlJAnkHg=@openvpn.net X-Received: by 2002:a05:6830:268f:b0:816:b03e:f9dc with SMTP id 46e09a7af769-8309479bfccmr8921755a34.5.1791750319983; Sun, 11 Oct 2026 13:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1791750319; cv=none; d=google.com; s=arc-20260327; b=YNAtOQoLuGENZvoQvgoNpt/7/6MCRrA8VyytA7g8Hm6sERc1kXzUc+9MJHO9EPLmC3 la1ig6bB8ByjdIi+/8wYkc8tXLf+hUVFg6jF6Af6aaeavnFxnyq+b6fusjuanbQ42y6n nrSdjiQ9BD1QuK9JdMOMuTDkRmaj52UKoohcATlymxLgfB7EAkxgY0gAwVh4sO6wbWL+ oz35Z/uxAoL0pNsvDYgUqFZTJbAYYHYKYVlA87Ku+sacBbV2mIRm4Hky+BWgtqred3QG zqRLdKnWQkCEyeZ8dyY8qxcg/nMTcPgkFUgWQ1REbD3LzQxCtZnEAgCKrawe+ia9Y+iF SNgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; 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=8syNbqzg9SxucqR+SH7kTgxzHervFFm4tPPquFd6VvA=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=CcPNaiWP+JffLLubNuXWYUWVpsEUc9TCVSYaFmuHTDgHAdI3SMCxpHMCjEUklyi6s8 fBPLQHhXh4nNu6dpgEY+FTT9p3GKUrH1FCmrDaDfopi1ZC2p5HUi5YEfh1fSw6/qe+Zn aFL3WqDyDzg/R4ip2IOwV18q4F50X5YAN0TOmCUfM6RY4ekjbQaaBmkEUZuG9yqc6cAl fgofd1cLF4e4ZGSyjrX+ETJ1RMQNH4mzaNZl7NAhvaK5QqvI++V1wNqDtdQ2miEGezTM 6tlfIxd56G0hjcTFGcHJ/3QHEzR/TG0Gso7HCGdib8rbP3PSBoXdJ7Aiw3l4HB9KCMzX +97Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Kja08u8s; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=JORHsGsW; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=K8wB9AY0; 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 46e09a7af769-8303b7b2719si13071444a34.133.2026.10.11.13.25.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Oct 2026 13:25:19 -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=Kja08u8s; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=JORHsGsW; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=K8wB9AY0; 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=8syNbqzg9SxucqR+SH7kTgxzHervFFm4tPPquFd6VvA=; b=Kja08u8s3czSAJ0PZfw3Wr0ZbZ FND5Oprq9RI7dpMuKBwk/G+TePuFKdVjBFYzWGmVefgrjBmmNku8TOSQsyHIEVmVYLoBhriF4t6e7 M51+Em/GOe8mJS7/g6OcLlOWvS22gRj4EFuZoxy8Qm6rvEjFgKPB5f1tfwIhj7u1Jk3E=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1xG06Z-0004WY-9t; Sun, 11 Oct 2026 20:25:11 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1xG06D-0004VL-2N for openvpn-devel@lists.sourceforge.net; Sun, 11 Oct 2026 20:24:49 +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=vAdVUeFO0HmXvc++Y1RoBlkxkoPF9xvRQuCSKeL211o=; b=JORHsGsWBbfdSKzue/4uSFq+eJ oyl9+LQ0b/qBrWMggdm4Fu/3a8ImjiO03ygLstaUl22e5a9vVf5uAgKhenGHOzslBh8J7rQGkyoCe yKw9+U9REaPqkUajKsc//pbxwkSwKs2oGSsOYUx346GkHJnIHCvJ7su1gU5M/to4iA7M=; 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=vAdVUeFO0HmXvc++Y1RoBlkxkoPF9xvRQuCSKeL211o=; b=K8wB9AY0rYqpwVvYmmID5cD8R3 UdueeyVJPOpsI8EMyh5X0mH4eZ5PSjUDQif5PSV79pl44HMrOsiid6fJPOcYpVEy53ucnVZc3eYMc w1unU11G3NAuTvvaAwBq7InDh+Omdivrm+jKrydTqXKTXngPT9rz3rSXBSZHHyE6T0mA=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1xG06B-0003XQ-Ej for openvpn-devel@lists.sourceforge.net; Sun, 11 Oct 2026 20:24:48 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 69BKOeMh015173 for ; Sun, 11 Oct 2026 22:24:40 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 69BKOeHD015172 for openvpn-devel@lists.sourceforge.net; Sun, 11 Oct 2026 22:24:40 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sun, 11 Oct 2026 22:24:34 +0200 Message-ID: <20261011202439.15128-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.53.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: Gianmarco De Gregori RTM_NEWLINK is primarily intended for link creation and initialization, while RTM_SETLINK is the canonical interface for modifying attributes of an already existing link. Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xG06B-0003XQ-Ej Subject: [Openvpn-devel] [PATCH v1] sitnl: use RTM_SETLINK for updating existing interfaces 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: 1878786383625531532 X-GMAIL-MSGID: 1878786383625531532 From: Gianmarco De Gregori RTM_NEWLINK is primarily intended for link creation and initialization, while RTM_SETLINK is the canonical interface for modifying attributes of an already existing link. Even though the kernel may accept RTM_NEWLINK for updates, using RTM_SETLINK better reflects the intended netlink semantics and follows the dedicated update path in the kernel. This makes the behavior more explicit and consistent with how link configuration changes are expected to be performed. Change-Id: I33e55d88d561393ebfbc73a995f700056e19a436 Signed-off-by: Gianmarco De Gregori Acked-by: Arne Schwabe Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1628 --- 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/+/1628 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/src/openvpn/networking_sitnl.c b/src/openvpn/networking_sitnl.c index b3f8e2b..3aea076 100644 --- a/src/openvpn/networking_sitnl.c +++ b/src/openvpn/networking_sitnl.c @@ -671,7 +671,7 @@ req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.i)); req.n.nlmsg_flags = NLM_F_REQUEST; - req.n.nlmsg_type = RTM_NEWLINK; + req.n.nlmsg_type = RTM_SETLINK; req.i.ifi_family = AF_PACKET; req.i.ifi_index = ifindex; @@ -707,7 +707,7 @@ req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.i)); req.n.nlmsg_flags = NLM_F_REQUEST; - req.n.nlmsg_type = RTM_NEWLINK; + req.n.nlmsg_type = RTM_SETLINK; req.i.ifi_family = AF_PACKET; req.i.ifi_index = ifindex; @@ -738,7 +738,7 @@ req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.i)); req.n.nlmsg_flags = NLM_F_REQUEST; - req.n.nlmsg_type = RTM_NEWLINK; + req.n.nlmsg_type = RTM_SETLINK; req.i.ifi_family = AF_PACKET; req.i.ifi_index = ifindex;