From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=fail (p=quarantine dis=none) header.from=redhat.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 1EFF85A0271 for ; Wed, 11 Nov 2026 08:03:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1794380615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/3I36y7UVQr5WE50blt4h61SZjOWzUTlY/hpCw16gPQ=; b=AwnSmo6NSjsMF2pAMZmNJ3wvmn6EtxqY/S2ODA1IY2rvbQKWcJ7x5JYG7MAJH9FZwBafWm CRpoZYlBA1MS2Ikp2fPtFWefic9JZow+/Vqig5OrFcOlj8o3ofeAfYlOr247w1cgMRxUJC JVrruE2no1nV3I/oN3qCFZew5CRccgM= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-660-GUqLW5nAPyCTNIBo8js23w-1; Wed, 11 Nov 2026 02:03:34 -0500 X-MC-Unique: GUqLW5nAPyCTNIBo8js23w-1 X-Mimecast-MFC-AGG-ID: GUqLW5nAPyCTNIBo8js23w_1794380613 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4a20e41008cso19003175e9.1 for ; Tue, 10 Nov 2026 23:03:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794380613; x=1794985413; h=date:content-transfer-encoding:content-type:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=/3I36y7U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b5:d95c:2378 with SMTP id 5b1f17b1804b1-4ba0939815cmr20827575e9.34.1794380612667; Tue, 10 Nov 2026 23:03:32 -0800 (PST) X-Received: by 2002:a05:600c:6214:b0:4b5:d95c:2378 with SMTP id 5b1f17b1804b1-4ba0939815cmr20826925e9.34.1794380612155; Tue, 10 Nov 2026 23:03:32 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-498811fa70esm8020743f8f.19.2026.11.10.23.03.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2026 23:03:27 -0800 (PST) From: Stefano Brivio To: Hayato Kiwata Subject: Re: [PATCH] fwd, conf: Roll back to old rules if switching to new ones fails Message-ID: <20261111080326.32637ece@elisabeth> In-Reply-To: <20261029162858.2199-1-dev@haytok.jp> References: <20261029162858.2199-1-dev@haytok.jp> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Wed, 11 Nov 2026 08:03:26 +0100 (CET) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: zxByhiVgLBxnYJCWYSpxm41lv8m70dMWFI9mwNWp3-Y_1794380613 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 6SXCR4SURUYA6YAF3OXUPMXTULPOANFM X-Message-ID-Hash: 6SXCR4SURUYA6YAF3OXUPMXTULPOANFM X-MailFrom: sbrivio@redhat.com 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 CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 30 Oct 2026 01:28:58 +0900 Hayato Kiwata wrote: > If fwd_listen_init() fails while switching to new forwarding rules > received from pesto, we currently close the old listening sockets, > report an error and keep the (partially bound) new rules. That leaves > pasta in a state the user didn't ask for. > > Make fwd_listen_switch() return the result of fwd_listen_init(), and > call it a second time from conf_handler() on failure to switch back > to the old rules. Ah, right, brilliant! I didn't realise that it doesn't actually need any further change because the other rules are always in c->fwd_pending. > Don't reset the count of the old table after closing its sockets, so > that the old rules stay in c->fwd_pending and can be restored. The > pending tables are cleared by conf_handler() before receiving new > rules anyway. > > Note that reporting the failure to the client is left for a later patch. > > Link: https://archives.passt.top/passt-dev/20261025153025.600a4fe9@elisabeth/ > Signed-off-by: Hayato Kiwata Applied, sorry for the delay. -- Stefano