From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 9C7FF5A0271 for ; Wed, 11 Nov 2026 10:01:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202610; t=1794387670; bh=izH8MmZnaPUd/HrNqT2u3hQuZucvGZwspTp90nUidMY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=neCqbU2zZn/GBSs3Ssdx3u0u6sViBbLE32OxF6vT36FYEpjDs0QnZ8Cw3kDWc80ez EeesDBHHqBW67VNn9y6LwMSU/a45jZnpfUmGU7LQV/XDb61wCWwhaKhbIPsfb+I0FW Tx+s0N/13O5xV+P/O8+eAVB0EGNyrPfNPNvqICXKn7eIlm5Arzwu+vW2Ai+4TeWcJr O0MCWrzeSsSaO8jQ+ZyAgOTZRyjZ7z4ZPiRS7szbat0dh1dzYdsV5azWnIXvouBkoj rUyt2w/nBu/KgiLJEfQ+1pwzEP8buWiZ8hYTBf817gTsM8uZNrb14KCnY+DkmcjZds Td7KApZIFWBJQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4jPcvB3CGhz4wTJ; Wed, 11 Nov 2026 20:01:10 +1100 (AEDT) Date: Wed, 11 Nov 2026 19:57:48 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] fwd, conf: Roll back to old rules if switching to new ones fails Message-ID: References: <20261029162858.2199-1-dev@haytok.jp> <20261111080326.32637ece@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="v8FmnGGguHWfdkHq" Content-Disposition: inline In-Reply-To: <20261111080326.32637ece@elisabeth> Message-ID-Hash: CU2KLDWQAUI2JUQ2M7RUYYQZCYBQWSJZ X-Message-ID-Hash: CU2KLDWQAUI2JUQ2M7RUYYQZCYBQWSJZ X-MailFrom: dgibson@gandalf.ozlabs.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 CC: Hayato Kiwata , 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: --v8FmnGGguHWfdkHq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 11, 2026 at 08:03:26AM +0100, Stefano Brivio wrote: > On Fri, 30 Oct 2026 01:28:58 +0900 > Hayato Kiwata wrote: >=20 > > 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. > >=20 > > 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. >=20 > 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. Right, I made it that way on purpose to support this kind of revert. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --v8FmnGGguHWfdkHq Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmr0Lf8ACgkQzQJF27ox 2Gc2qw/9FRucZf5CfqlSqBjmiwnjZk2TUGXm2THLPxveoT1tqtp3Qg+7Vs2Sr723 5zxWWs9IQmJ8GhjWSerSwVdKoywyJrREcb2xk6vulT4WAJ54KyZaj4fyksJzyNle qHZIzo8bzVlX2+PJCB/rTTQyt/G0ziJyu1uVJwN70RDJoKquumrDP2E4DVfr4r6x H5W/o0wq0k7N0NlSxvi74rfFogH+rG3bwY3ruj92SOJeOmvr3GLww8+JzDSgMLy7 QBCdgO67Gr2e+HmqYxF4rS2IxD1aasz5tKaYHxTm9oxw8QeNTCrQVbhLsHrWEgyE e7gUXjlsVRHFRBfmxfZ/EQyYuKum4hdN/LRt9jMhLRNJqIdeEJUm6dqkIghtjYUe 3dmSQgMIm8QtFnJ5MLXcgfLw3E+V6q5k5PaBKkI9lOBRWx04gPHtOCjZd0IerGpu jMfYuZWWEnLwnGD+M7rB8f5b3QZ4CyDhXQYL5Q056Wo/0qkzHbJhA0ETrr7zVO+o gI5+2BLhSgoOV10c7Ktg0UvdME69cHCxagn6+zYzqRRvGyebzeRF2f4iOCn/Evp7 NTWcx9pq+Kq7cqkqSfEBIEs3i4jrZkdp3S+K3cn6FQeETFgsNlUc6NKVGWaI/LHX Q8dD7ucQ87cO2XN2ImjMYghHisiw9r+h5xRyrUgIm9BxWVaI2SI= =wPQW -----END PGP SIGNATURE----- --v8FmnGGguHWfdkHq--