From patchwork Thu Apr 11 15:01:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 7726 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 (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4VFjZW50f9z3wwD for ; Thu, 11 Apr 2024 15:01:23 +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 (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4VFjZS0qcPz2VB; Thu, 11 Apr 2024 15:01:20 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4VFjZS0Hxsz32qd; Thu, 11 Apr 2024 15:01:20 +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 (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4VFjZP3QMGz2ytM for ; Thu, 11 Apr 2024 15:01:17 +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 (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4VFjZP21x6z1Jw; Thu, 11 Apr 2024 15:01:17 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1712847677; 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=yXO51YjBgjdryLgJlnNj2wfi+EfeiELHMZyYIMzJ+TE=; b=m0HwII7ukIkSnEpwROjqgJtOxPfoRMNC88y/43QJkRS9Btna7L7X/4kq6SmGmxPDIl8/hd L8u+6QhGkFU/hBDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1712847677; 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=yXO51YjBgjdryLgJlnNj2wfi+EfeiELHMZyYIMzJ+TE=; b=HY+idBc1L0sK3sixCjo0KkVQJQPFsfllLZW/ha2Vsp8FLpRogIKGMVKpzHDa7xe0tISzEe mBmBaasO8P77cYcjQ6cU+jPAz+dR4Ax/6J2z2owdkfda1kjBbKxiv8mA1VWAGAmq2pWlYm HXWrJOQZorf7H3DxLstGtGDUShiuFW1vfdOKd3SDXVUe/x3IRMLj9edzC+NPHJ6azw/xdH gZZ/adLX9KoxNHFjbTSwsxJNQEMizypY6bXEF/Oj5je8B3rUgcW8Gk1jx1uWOAhRJWw/cn gckeKYgV1rIE2Dsi3Z7PfPGWP7L7Q4283VsCqsCXeYZ+Y3mYj1pNpgdQJ4umqA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/9] static-routes: Fixes bug12763 Date: Thu, 11 Apr 2024 17:01:01 +0200 Message-ID: <20240411150108.21573-2-adolf.belka@ipfire.org> In-Reply-To: <20240411150108.21573-1-adolf.belka@ipfire.org> References: <20240411150108.21573-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: ILO4E67KVMQKMVIMZOMUB5W5BHEO535I X-Message-ID-Hash: ILO4E67KVMQKMVIMZOMUB5W5BHEO535I X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: <> List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - This ensures that all ip route and ip rule commands are redirected to null if the output is not used to feed into a variable. - This will prevent any error messages related to empty iproute tables being displayed during boot. - Tested on my vm system and confirmed that the fix in ipsec-interfaces stops the "FIB table does not exist" and "RTNETLINK answers: no such file or directory" messages during boot. Fixes: Bug#12763 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- src/initscripts/system/static-routes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/initscripts/system/static-routes b/src/initscripts/system/static-routes index 85785e9af..9aacc8db5 100644 --- a/src/initscripts/system/static-routes +++ b/src/initscripts/system/static-routes @@ -29,14 +29,14 @@ function init_table() { return fi - ip rule add table static + ip rule add table static >/dev/null 2>&1 } function create_all_routes() { local file=${1} shift - # Remote all routes. + # Remove all routes. ip route flush table static >/dev/null 2>&1 local status @@ -54,7 +54,7 @@ function create_all_routes() { continue fi - ip route add ${network} via ${gateway} table static proto static + ip route add ${network} via ${gateway} table static proto static >/dev/null 2>&1 done < ${file} }