From patchwork Mon Nov 6 17:32:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "its_Giaan (Code Review)" X-Patchwork-Id: 3415 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:8e12:b0:f2:62eb:61c1 with SMTP id j18csp3244518dys; Mon, 6 Nov 2023 09:33:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFoBnyRLu5VGOKcNBAujNN5ZNd1cUiv8U2cb/pAzmNHnfSoxwQlkviSZ8Um3zFRKC7oZEzi X-Received: by 2002:a05:6a20:158a:b0:182:2282:f3d3 with SMTP id h10-20020a056a20158a00b001822282f3d3mr10002110pzj.1.1699292017541; Mon, 06 Nov 2023 09:33:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699292017; cv=none; d=google.com; s=arc-20160816; b=K/aN0vjqWPe2iDaOh7ckSGzFaKoM0tj5Pnsroo0972lrALtWyXwjGPaAup0xzw8IVV lFgN9ouCYnKKuOXyTB1PrX+86TScCusbbOKSaRy/nPIpdPvNklsHuQhc5ulcS43muR42 TiSPObFbvvx7UUmGBuysZI/YqiISXVb8GtJ4MN62KwC44+CIk647Wb0sS7MU7/jNF25e E0Y3XDY29RBm+8WWczg6DjYCV7sjrNLQSPniYs/FnatNQCqfoBwUIPyfJJ/bzSb/oMSZ JvCbYT5GVRu2EB3yFr84MZLJ1qNmjbPAUwLzyAYDxUg7BkMwZKTJVRDaPJEtGAXxJRPq loXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=fmANJ3VuKn6d0lT59QLmbngfRav1J1Q0OdhVrulR3VY=; fh=GFP4qDxgyJ2WEPo/oeLZg3Mj4NqvY1j2nTvTt7psNwg=; b=V4WXy3xVZtUCJNMus0PN7Txnz6hwgfpae1tFI6c/2lfzZK17/+bbF5fKT5FNaVW0o5 36YdAMrPgrzP8iHXqgg+itzKfO7NE83iIXDGxpV7bFGMcmr/DpFNlZgtMDpkQMKnavIB fppEPQYaMnM7hxKA0YatE+tLNmv+Cfg+k3VDlUSROvOeaslUI2sYAhTEc8OdCdaqPrfP Ov13EpUMef+VOFnT+TtiF0o2r9eaa8w+Ff1eXpJ2ljrsg3lhmoNKXETBu82V9fUlprJT OFxkfrbqcvjc0OztflS1hqP2NQuW/zWraFNelzTwL4+CiIiKdlYnCDJFn4Xb+8zU+706 /5Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=coTwylmS; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=kXM68GdQ; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=SIln6vpt; 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=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id jy6-20020a17090342c600b001cae629cf10si7936438plb.544.2023.11.06.09.33.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Nov 2023 09:33:37 -0800 (PST) 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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=coTwylmS; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=kXM68GdQ; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=SIln6vpt; 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=openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1r03TG-0000HB-Ru; Mon, 06 Nov 2023 17:33:06 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1r03TE-0000Gz-Vd for openvpn-devel@lists.sourceforge.net; Mon, 06 Nov 2023 17:33:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VG/+1rVyYu5Kokxa0pD4K+E0lk+YvKtkdd3qoPojEZ4=; b=coTwylmSltIxsY9JutNbNAwL/F ktkqVDUylmOWEh2Sl59m3cTtwJTT6XGwrSnAJjIeABJJaDGeSyGUM32Q1ThQYjf8ZRwDtoCqC/lti tWuyFMNQaOh5HdCr9d/HewEhzrPZkHFaxnQp9gW0LrhDD4anvCFxxvUaTE3uQso9uUf0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=VG/+1rVyYu5Kokxa0pD4K+E0lk+YvKtkdd3qoPojEZ4=; b=k XM68GdQk8/iXQ6MsG5J5ztwzbACEMP2L+Cscw6Ckd8aqyRVywvNtv0dxE9qO3E0IguMxBasu7BZwx r0ts7oOFClFQmkvdHZ1XLxQ42nNfi46UEiBneloT7OYYEz08nr0pnErh1UnPD2CAUSs4EkX0FT7KE HtsUAxcMMOQpuzpI=; Received: from mail-lf1-f48.google.com ([209.85.167.48]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1r03T8-00060I-5W for openvpn-devel@lists.sourceforge.net; Mon, 06 Nov 2023 17:33:04 +0000 Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-507d1cc0538so6350873e87.2 for ; Mon, 06 Nov 2023 09:32:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1699291971; x=1699896771; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=VG/+1rVyYu5Kokxa0pD4K+E0lk+YvKtkdd3qoPojEZ4=; b=SIln6vptvTNPyhG0edsKkfDtrwhVSjhTEEm2I3X+dOQrKMklJj3VR3RUYxGcj/hHe/ 53T1hUxXwe89zTS+iVxfX6IWOBH9bpHN/ig/ZOGnBbtRSTVRpQkxa4fIfzWyy7cClTld He/CQMboK59NuCTeUYbrre+rI5JNoPs0bvVyACUMluadoo04q9vzLyzCQe40l6ZFG+EB MNlANJaY8vW8KS5Nkh/APC+cZcxOQMrHVJSJ0o6JnVQjhyPVCWxbVrbTjny9JE0hMU4U tqlfPaOxDblDjO6goItWBoWaVn/Q0nuQa5E+MDZEeJ7WjGb5raENQf3Cdl0U+UDQ8h+C uuQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699291971; x=1699896771; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VG/+1rVyYu5Kokxa0pD4K+E0lk+YvKtkdd3qoPojEZ4=; b=Vv1/wbFnY3VjkJTBJHErMF6zk5idmJaHbI18kTi/apRhn/BJN5X2AP7XGXq6EHSPKG YLJY6qhTcQ/QFXgCrAuk4A1nyMxzwuR6SzHcx4CQR1QHHX18avTO1BFjaRkYaoT749V4 oqKbeRS0QDLqu7KtdnDdC6nhp4DbRedMkiK5nsFnOut7znJajXVqannMhSuy3MH8eZQD +4edGAb3FEuh9zr6fsZIZmnHuH9zviGeBL8Yxd0R1/ngqnYvGYTL0rxRjQB83bVxnh45 cztVp7tcD25eDyFOVRFeEQyxQCTq0WgQjOh3xewTeOVb8BdbKuEX+zP9yVoK41FtKp81 Kbug== X-Gm-Message-State: AOJu0YxxGyr5wAWIZ4fIpr9d8O1gaIngOmzrGiQmHbtaFzUB6/h+z2WZ tHzkNTnRck5NfJ/Zxsxb9X9qeqtxeiA2lEdLoGM= X-Received: by 2002:ac2:5f92:0:b0:507:974d:80f9 with SMTP id r18-20020ac25f92000000b00507974d80f9mr23696868lfe.34.1699291971226; Mon, 06 Nov 2023 09:32:51 -0800 (PST) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id e12-20020adffd0c000000b0032d893d8dc8sm168958wrr.2.2023.11.06.09.32.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 09:32:50 -0800 (PST) From: "flichtenheld (Code Review)" X-Google-Original-From: "flichtenheld (Code Review)" X-Gerrit-PatchSet: 1 Date: Mon, 6 Nov 2023 17:32:50 +0000 To: plaisthos Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: Iede3e7c028cbb715e28bc88c7e583f84dadc02c8 X-Gerrit-Change-Number: 421 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 0add0b58ee6b28d5bf743759d3e1d513793e4482 References: Message-ID: <2846822129298044d81fb82e95cc6c16c8e5a4c8-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", 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: Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.48 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.48 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message 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 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1r03T8-00060I-5W Subject: [Openvpn-devel] [S] Change in openvpn[master]: Change default of "topology" to "subnet" 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: , Reply-To: frank@lichtenheld.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1781836826384722469?= X-GMAIL-MSGID: =?utf-8?q?1781836826384722469?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/421?usp=email to review the following change. Change subject: Change default of "topology" to "subnet" ...................................................................... Change default of "topology" to "subnet" Change-Id: Iede3e7c028cbb715e28bc88c7e583f84dadc02c8 Signed-off-by: Frank Lichtenheld --- M doc/man-sections/vpn-network-options.rst M src/openvpn/options.c 2 files changed, 10 insertions(+), 11 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/21/421/1 diff --git a/doc/man-sections/vpn-network-options.rst b/doc/man-sections/vpn-network-options.rst index 3fa3ccf..251529f 100644 --- a/doc/man-sections/vpn-network-options.rst +++ b/doc/man-sections/vpn-network-options.rst @@ -495,11 +495,17 @@ ``mode`` can be one of: + :code:`subnet` + Use a subnet rather than a point-to-point topology by + configuring the tun interface with a local IP address and subnet mask, + similar to the topology used in ``--dev tap`` and ethernet bridging + mode. This mode allocates a single IP address per connecting client and + works on Windows as well. This is the default. + :code:`net30` Use a point-to-point topology, by allocating one /30 subnet per client. This is designed to allow point-to-point semantics when some - or all of the connecting clients might be Windows systems. This is the - default. + or all of the connecting clients might be Windows systems. :code:`p2p` Use a point-to-point topology where the remote endpoint of @@ -508,15 +514,8 @@ connecting client. Only use when none of the connecting clients are Windows systems. - :code:`subnet` - Use a subnet rather than a point-to-point topology by - configuring the tun interface with a local IP address and subnet mask, - similar to the topology used in ``--dev tap`` and ethernet bridging - mode. This mode allocates a single IP address per connecting client and - works on Windows as well. - *Note:* Using ``--topology subnet`` changes the interpretation of the - arguments of ``--ifconfig`` to mean "address netmask", no longer "local + arguments of ``--ifconfig`` to mean "address netmask", and not "local remote". --tun-mtu args diff --git a/src/openvpn/options.c b/src/openvpn/options.c index d238269..764ca7b 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -800,7 +800,7 @@ o->gc_owned = true; } o->mode = MODE_POINT_TO_POINT; - o->topology = TOP_NET30; + o->topology = TOP_SUBNET; o->ce.proto = PROTO_UDP; o->ce.af = AF_UNSPEC; o->ce.bind_ipv6_only = false;