public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v4 2/2] conf, icmp, tcp, udp: Add options to bind to outbound address and interface
Date: Thu, 9 Mar 2023 03:42:42 +0100	[thread overview]
Message-ID: <20230309034242.75d98d48@elisabeth> (raw)
In-Reply-To: <ZAlE95uHMImFZnMI@yekko>

On Thu, 9 Mar 2023 13:31:19 +1100
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Thu, Mar 09, 2023 at 03:09:47AM +0100, Stefano Brivio wrote:
> > I didn't notice earlier: libslirp (and slirp4netns) supports binding
> > outbound sockets to specific IPv4 and IPv6 addresses, to force the
> > source addresse selection. If we want to claim feature parity, we
> > should implement that as well.
> > 
> > Further, Podman supports specifying outbound interfaces as well, but
> > this is simply done by resolving the primary address for an interface
> > when the network back-end is started. However, since kernel version
> > 5.7, commit c427bfec18f2 ("net: core: enable SO_BINDTODEVICE for
> > non-root users"), we can actually bind to a specific interface name,
> > which doesn't need to be validated in advance.
> > 
> > Implement -o / --outbound ADDR to bind to IPv4 and IPv6 addresses,
> > and --outbound-ip4 and --outbound-ip6 to bind IPv4 and IPv6 sockets
> > to given interfaces.  
> 
> s/outbound-ip/outbound-if/g

Oops, again. Fixed in my tree.

-- 
Stefano


      reply	other threads:[~2023-03-09  2:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09  2:09 [PATCH v4 0/2] Implement explicit outbound address and interface selection Stefano Brivio
2023-03-09  2:09 ` [PATCH v4 1/2] conf, passt.h: Rename "outbound" interface to "template" interface Stefano Brivio
2023-03-09  2:09 ` [PATCH v4 2/2] conf, icmp, tcp, udp: Add options to bind to outbound address and interface Stefano Brivio
2023-03-09  2:31   ` David Gibson
2023-03-09  2:42     ` Stefano Brivio [this message]

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=20230309034242.75d98d48@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --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).