netavark icon indicating copy to clipboard operation
netavark copied to clipboard

Container with macvlan dhcp network does not inherit network routes

Open Domini opened this issue 5 months ago • 3 comments

When you create a macvlan dhcp network with hardcoded routes, e.g. podman network create --driver=macvlan --ipam-driver=dhcp --route=X, containers using this network ignore provided --route=X and only insert direct connected route for dhcp-provided IP/subnet and (unless --opt no_default_route provided to podman network create) default route to dhcp-provided gateway.

Together with https://github.com/containers/netavark/issues/1280 this makes it impossible to insert necessary routes declaratively from either hardcoded --route or from DHCP, only programmatically from within the container itself (or with ip netns dirty magic from the host).

Domini avatar Jul 28 '25 13:07 Domini