| Message ID | 20260512144358.419599-3-a@unstable.cc |
|---|---|
| State | New |
| Headers | show
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:7000:a719:b0:84a:48f:a1fd with SMTP id
hl25csp2520300mab;
Tue, 12 May 2026 07:45:14 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AFNElJ/Hl2TzQZTXOoqLuYmC139Owyr1iSEFp5rgais5JmQIPd+0QHbrW/ZQ4u87PtJV/8+WbMn9w13ROrY=@openvpn.net
X-Received: by 2002:a05:6808:4f1f:b0:479:fa21:adfe with SMTP id
5614622812f47-4807fbf776emr10840807b6e.6.1778597114169;
Tue, 12 May 2026 07:45:14 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1778597114; cv=none;
d=google.com; s=arc-20240605;
b=hDpccDQNe3WR9nyyuVEiL6JlX98NuNvAYPmPIaDeocjt5XiCxFpx6QqKyxuNQRUyLK
UDMiscNmVTTB528UXwr1q2OQKw2DyogjA99KQzMhtLw2/0QEGnqvP7jvgpyZryeEdIq2
3kQgNQWHvZOYoMFwO906eloY8IMPgKFYJmnyZ8QgJPm31vlrxio6ySji0iw2oTrEoPWS
vkXeRw+KJ3SupO0lflLSf71MxjYpRxxF7ZFw65xmCoNciW7vqU2DxwFNJ4ZpJq4hY2/x
MtqF/w1ChlOTvpDxNnU1yUx4zZLc9SROC3AsVxecang6HlQKb4OYx3snuFy06J3O+pdm
4tuA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=errors-to:content-transfer-encoding:cc: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=DQq7i3hTRaqcbiiS4msKqcJfsDwLIzslY7rbYGV/Eag=;
fh=BsMg/B0Yb/hS/rzP5Npz4luh0IleZm8REk1XWiWRt2A=;
b=jSNkHG1fj4+YMVYQm1qcIn/PH8kwrEgF/i+WhuRRaYEKfJTFzZ2wFTWpwQO3phDvpL
qmKvNPfyAq6kWYJq471ltDm2kzSNkoaXsbFID6AaoRX3gsDHITcWKltEcis4ybFBJjTk
L2mEt3viMfEtAT4m672ukR+pJVIfCOKRT8wDPhDs45x4HhgmMMjUDc9rVk7ACZHqUNez
Nilw6IfTfJEQRt3J/X7GjXohytP1pOuHXK7rjxld2JUmjwCtK8TV8ncKLogHFD02Idfr
BtyMqNviTRfq5eWMqFQ1htbZCE5SvA18kCp6DGQrKxlzcrgFO0bpxcwW/vvRWOjG7zxX
AH+A==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=BdYA8CKj;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=c6lZDqj9;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=N043nRr4;
dkim=neutral (body hash did not verify) header.i=@unstable.cc
header.s=MBO0001 header.b=SPAbJIDI;
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-47c76dcdb33si19935136b6e.113.2026.05.12.07.45.13
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Tue, 12 May 2026 07:45:14 -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=BdYA8CKj;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=c6lZDqj9;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=N043nRr4;
dkim=neutral (body hash did not verify) header.i=@unstable.cc
header.s=MBO0001 header.b=SPAbJIDI;
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:Cc:
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:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender
:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;
bh=DQq7i3hTRaqcbiiS4msKqcJfsDwLIzslY7rbYGV/Eag=; b=BdYA8CKjuCTdgRBHTTblXmBn+i
A0tMixhw8siCjftH1EKM5gHSItH16KHBLhuOQ+wcYkJHBrQaPqiraAzSD2FiNUual8u0Y49Sqs/WU
MLYAuGPabzLaR4Rnjo2UNxqWeMiADgVfYn/MsUZRWfdoQqQ6fQRudCRvb1rs22D/PG78=;
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 <openvpn-devel-bounces@lists.sourceforge.net>)
id 1wMoMA-000762-Gn;
Tue, 12 May 2026 14:45:11 +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 <a@unstable.cc>) id 1wMoM7-00075u-Th
for openvpn-devel@lists.sourceforge.net;
Tue, 12 May 2026 14:45:08 +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=QIDyo6Q12BWEooP0o6eJfp8msatQvnTtzrGnwIjsvFg=; b=c6lZDqj9/HObEOCqaqsk7wZq2a
dHEfoTugYK5ryjNL8lgc1dcHSqf1RO98lSgY4cz3wrG0WLhOPlIh4srY6UGTLZxIXvMbx0AW803p+
1461j7DPcN9zJCUNlCH9aTXcbXwKxCc8Us9PK0aDRu2MKNhU0FniK17Yh9jwx71QIepY=;
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=QIDyo6Q12BWEooP0o6eJfp8msatQvnTtzrGnwIjsvFg=; b=N043nRr49BA+zYRsyY+bmDMm4Z
4QSBddLkJPfFHPapX7uC5vILkqE0B4st32q2xZxiIP8qsG+DRhbI7C7LBW1fNvfS3udqhZxdfKL0V
NpoNyMUaQRJWYYCDwu/ixDnrRwClZMDwaiFOXdJoyYz/4LoS2sNCxsbfcCQckG3i49Wc=;
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 1wMoM5-0007Id-29 for openvpn-devel@lists.sourceforge.net;
Tue, 12 May 2026 14:45:06 +0000
Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102])
(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 4gFKBD66V3z9tnp;
Tue, 12 May 2026 16:44:52 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unstable.cc;
s=MBO0001;
t=1778597092;
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=QIDyo6Q12BWEooP0o6eJfp8msatQvnTtzrGnwIjsvFg=;
b=SPAbJIDIV3Y4XvIy5/wvSGBqBtbciRF5qEVgOsC7hASudIJ+Vumn77aYbOmzBO1HaevF7I
PSJQn7arY3GLJY3ltyAAs8GKzZ2jesgvyFHT25Jtl+fDHkaIb/qHaEd95JLU/h3WnMihC/
xkOMljO8xYMh00I96lEWh+7Zo+Zbxmfhun2+7Y123mvcFMmdJF+Pp7m5zNSKfDVrLxlKl5
v1T/xlkG4Yf/u8Aja3w813O8VUQ1/SPPDdPRr/7coZjtqJcwYbNxYTjxunR2mqRIkd6ti5
L9VdZvaQnnpxqS1MVgpIBQc7SjsVPjGg5nquDdGr6p6r2T8EO4mhTyHeH441xw==
From: Antonio Quartulli <a@unstable.cc>
To: openvpn-devel@lists.sourceforge.net
Date: Tue, 12 May 2026 16:43:56 +0200
Message-ID: <20260512144358.419599-3-a@unstable.cc>
In-Reply-To: <20260512144358.419599-1-a@unstable.cc>
References: <20260512144358.419599-1-a@unstable.cc>
MIME-Version: 1.0
X-Spam-Score: -0.9 (/)
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: Ralf Lici <ralf@mandelbit.com> Use the socket's
locally
bound address if it's explicitly specified via the --local option in openvpn.
Signed-off-by: Ralf Lici <ralf@mandelbit.com> Signed-off-by: Antonio
Quartulli
<antonio@openvpn.net> --- drivers/net/ovpn/udp.c | 6 ++++-- 1 file changed,
4 insertions(+), 2 deletions(-)
Content analysis details: (-0.9 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low
trust [80.241.56.151 listed in list.dnswl.org]
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
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
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
X-Headers-End: 1wMoM5-0007Id-29
Subject: [Openvpn-devel] [PATCH ovpn net-next 3/5] ovpn: use bound address
in UDP when available
X-BeenThere: openvpn-devel@lists.sourceforge.net
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Cc: Antonio Quartulli <antonio@openvpn.net>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
X-GMAIL-THRID: =?utf-8?q?1864994247575946815?=
X-GMAIL-MSGID: =?utf-8?q?1864994247575946815?=
|
| Series |
[Openvpn-devel,ovpn,net-next,1/5] ovpn: use bound device in UDP when available
|
expand
|
diff --git a/drivers/net/ovpn/udp.c b/drivers/net/ovpn/udp.c index 78b9aea06de9..b5d1ca014732 100644 --- a/drivers/net/ovpn/udp.c +++ b/drivers/net/ovpn/udp.c @@ -147,7 +147,7 @@ static int ovpn_udp4_output(struct ovpn_peer *peer, struct ovpn_bind *bind, { struct rtable *rt; struct flowi4 fl = { - .saddr = bind->local.ipv4.s_addr, + .saddr = inet_sk(sk)->inet_rcv_saddr ?: bind->local.ipv4.s_addr, .daddr = bind->remote.in4.sin_addr.s_addr, .fl4_sport = inet_sk(sk)->inet_sport, .fl4_dport = bind->remote.in4.sin_port, @@ -225,7 +225,9 @@ static int ovpn_udp6_output(struct ovpn_peer *peer, struct ovpn_bind *bind, int ret; struct flowi6 fl = { - .saddr = bind->local.ipv6, + .saddr = ipv6_addr_any(&sk->sk_v6_rcv_saddr) ? + bind->local.ipv6 : + sk->sk_v6_rcv_saddr, .daddr = bind->remote.in6.sin6_addr, .fl6_sport = inet_sk(sk)->inet_sport, .fl6_dport = bind->remote.in6.sin6_port,