Bug 71

Summary: pasta doesn't properly handle RTA_PREFSRC elements when copying routes
Product: passt Reporter: David Gibson <dgibson>
Component: pastaAssignee: nobody
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   

Description David Gibson 2023-08-23 06:38:49 UTC
By default we copy host routes to the container with pasta and --config-net.  However, this can fail if those routes contain RTA_SRC attributes and we use -a to give the container an address different from that on the host.

Setting a route with RTA_SRC musc give an address which is set on an interface in the namespace, so if we copy an RTA_SRC from the host with a host address to a namespace with a different address, we get an -EINVAL on the NEWROUTE, causing --config-net to fail entirely.

This is the root cause of at least one of the failures noted in https://github.com/containers/podman/pull/19699#issuecomment-1688769287
Comment 1 David Gibson 2023-08-23 07:03:09 UTC
Oops, it's actually RTA_PREFSRC, not RTA_SRC that's the issue.