public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Hayato Kiwata <dev@haytok.jp>
Cc: passt-dev@passt.top
Subject: Re: [PATCH] fwd, conf: Roll back to old rules if switching to new ones fails
Date: Wed, 11 Nov 2026 08:03:26 +0100 (CET)	[thread overview]
Message-ID: <20261111080326.32637ece@elisabeth> (raw)
In-Reply-To: <20261029162858.2199-1-dev@haytok.jp>

On Fri, 30 Oct 2026 01:28:58 +0900
Hayato Kiwata <dev@haytok.jp> 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 <dev@haytok.jp>

Applied, sorry for the delay.

-- 
Stefano


  reply	other threads:[~2026-11-11  7:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 16:28 Hayato Kiwata
2026-11-11  7:03 ` Stefano Brivio [this message]
2026-11-11  8:57   ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261111080326.32637ece@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=dev@haytok.jp \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).