public inbox for passt-user@passt.top
 help / color / mirror / Atom feed
From: Rahul <llvm.zentrik@gmail.com>
To: passt-user@passt.top
Subject: UDP drops when source port is in use in the init namespace
Date: Sun, 30 Aug 2026 11:12:44 +0100	[thread overview]
Message-ID: <CAOiLhOTSZuDVd79dHkdVgVurXXkr62wPTYKuD7F++47ssPeJhg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

Hi,

I'm seeing DNS requests being dropped when using pasta 20250217. As far as
I can tell, UDP
flows where the source port chosen in the namespace is already in use in the
init namespace get dropped.

All three fwd_nat_from_*() preserve the source port for UDP:

tgt->oport = 0;
if (proto == IPPROTO_UDP)
/* But for UDP preserve the source port */
tgt->oport = ini->eport;

That forces a bind() to it, and udp_flow_sock() treats bind failure as
fatal, so
the flow is cancelled and the datagram dropped with no error to the sender.

I don't think I ever hit this with slirp4netns, it looks like libslirp's
udp_attach() never
binds a port, so the kernel just gives it a random free port.

I'm not sure whether this is intended, but if it is, is there any way to
work
around it?

Thanks

[-- Attachment #2: Type: text/html, Size: 911 bytes --]

             reply	other threads:[~2026-08-30 10:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30 10:12 Rahul [this message]
2026-09-01 18:56 ` Stefano Brivio

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=CAOiLhOTSZuDVd79dHkdVgVurXXkr62wPTYKuD7F++47ssPeJhg@mail.gmail.com \
    --to=llvm.zentrik@gmail.com \
    --cc=passt-user@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.
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).