From patchwork Thu Jan 14 18:54:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 3804 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4DGtlC01mVz3whw for ; Thu, 14 Jan 2021 18:54:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4DGtl93NQqzpd; Thu, 14 Jan 2021 18:54:13 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4DGtl91tm1z2y51; Thu, 14 Jan 2021 18:54:13 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4DGtl73KyZz2xWW for ; Thu, 14 Jan 2021 18:54:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4DGtl65DZszB4; Thu, 14 Jan 2021 18:54:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1610650450; 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; bh=KKClrdI82Ph94b/9JuzijQg7FLubHHPyLo96dkg2ljU=; b=9yrpXX+MobiW8z2/2lmIsXeybpkuwRf3rIhOfTR+/7jhIBiUZF1fNk2MVvze8000zsS/nK 8U3+YETT/YhmJvAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1610650450; 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; bh=KKClrdI82Ph94b/9JuzijQg7FLubHHPyLo96dkg2ljU=; b=h23J3NzBGkB51GbNexc/eZ3Uf5MQ3CGTiuwkJ9skbk1ycCBG1zvHtYn1TfdkiucvynuaZt ef0kNSc2a4W1UGkf+oTDBEFJMerwYITawYmwpv68TfAdJnHdvqgI7t2WQ7w2AcxrIBPEFt EKARXLOdbAUoPxqePeiWaVnKbObraMv6cr3q23oev+OJ1r4E8Fyhphy8eEuTfNQyKboZ98 FDN++YkxuzSVTvcVMivh/xMC2tamPSjzRJwbkrXhOCsP7Zb1BhLyHE/IvGDh8LBuPfs1Y7 +vGHG+QGUpXfzDWf/5gY6pRSeVMh3qFbcI0Neo1aDSs7L0uHijJ4/vkQGuxU/A== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH] IPsec: Disable XFRM policy lookup for VTI devices Date: Thu, 14 Jan 2021 18:54:03 +0000 Message-Id: <20210114185403.8839-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" This speeds up throughput slightly Signed-off-by: Michael Tremer --- src/scripts/ipsec-interfaces | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/scripts/ipsec-interfaces b/src/scripts/ipsec-interfaces index 2546f8927..f0983dbdc 100644 --- a/src/scripts/ipsec-interfaces +++ b/src/scripts/ipsec-interfaces @@ -228,6 +228,11 @@ main() { ip addr flush dev "${intf}" ip addr add "${interface_address}" dev "${intf}" + # Disable IPsec policy lookup for VTI + if [ "${interface_mode}" = "vti" ]; then + sysctl -qw "net.ipv4.conf.${intf}.disable_policy=1" + fi + # Set MTU ip link set dev "${intf}" mtu "${interface_mtu}"