Subject: Re: [PATCH net-next 3/9] selftests/net: Add env for container based tests

From: Jakub Kicinski <[email-masked]>
Date: Fri, 27 Feb 2026 18:30:45 -0800

On Tue, 24 Feb 2026 10:10:31 -0800 Bobby Eshleman wrote:
> > +Local IP prefix/subnet which can be used to allocate extra IP addresses (for
> > +network name spaces behind macvlan, veth, netkit devices). DUT must be
> > +reachable using these addresses from the endpoint.
> > +
> > +  +-------------+        +----------------------------+
> > +  | INIT NS     |        | TEST NS                    |
> > +  | +---------+ |        | +------------------------+ |
> > +  | | NETIF   | |  bpf   | | Netkit                 | |
> > +  | |         |-|--------|>| nk_guest               | |
> > +  | +---------+ |        | | {LOCAL_PREFIX_V6}::2:2 | |
> > +  | +---------+ |        | +------------------------+ |
> > +  | | Netkit  | |        +----------------------------+
> > +  | | nk_host | |
> > +  | +---------+ |
> > +  +-------------+
> > +  
> 
> One thing I noticed when I tested this was the flow broke down when
> NETIF's address happened to match LOCAL_PREFIX_V6. I didn't fully reason
> through why this was the case, but maybe it's worth mentioning in the
> docs here?

+1 I think it may be useful to add to the diagram some example using
the documentation IPv6 prefix, to explain what the addresses and routes
are in each of the boxes (and please include the remote).

Also 

	local_prefix = local_prefix.rstrip("/64").rstrip("::").rstrip(":")

please use Python's built in ipaddress. The standard parser will be far
more flexible for user input