aboutgitcodebugslistschat
path: root/util.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2025-01-23 08:55:49 +0100
committerStefano Brivio <sbrivio@redhat.com>2025-01-24 21:39:52 +0100
commitd477a1fb03c5995d07e481b25dd94fc9e9bc02f2 (patch)
tree39bbff6597ccfb588ec6a7c41ec160c4f516997d /util.c
parent4f2c8e79130ef3d6132e34c49746e397745f9d73 (diff)
downloadpasst-d477a1fb03c5995d07e481b25dd94fc9e9bc02f2.tar
passt-d477a1fb03c5995d07e481b25dd94fc9e9bc02f2.tar.gz
passt-d477a1fb03c5995d07e481b25dd94fc9e9bc02f2.tar.bz2
passt-d477a1fb03c5995d07e481b25dd94fc9e9bc02f2.tar.lz
passt-d477a1fb03c5995d07e481b25dd94fc9e9bc02f2.tar.xz
passt-d477a1fb03c5995d07e481b25dd94fc9e9bc02f2.tar.zst
passt-d477a1fb03c5995d07e481b25dd94fc9e9bc02f2.zip
netlink: Skip loopback interface while looking for a template
There might be reasons to have routes on the loopback interface, for example Any-IP/AnyIP routes as implemented by Linux kernel commit ab79ad14a2d5 ("ipv6: Implement Any-IP support for IPv6."). If we use the loopback interface as a template, though, we'll pick 'lo' (typically) as interface name for our tap interface, but we'll already have an interface called 'lo' in the target namespace, and as we TUNSETIFF on it, we'll fail with EINVAL, because it's not a tap interface. Skip the loopback interface while looking for a template interface or, more accurately, skip the interface with index 1. Strictly speaking, we should fetch interface flags via RTM_GETLINK instead, and check for IFF_LOOPBACK, but interleaving that request while we're iterating over routes is unnecessarily complicated. Link: https://www.reddit.com/r/podman/comments/1i6pj7u/starting_pod_without_external_network/ Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'util.c')
0 files changed, 0 insertions, 0 deletions