diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2024-04-04 17:04:37 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-04-05 16:58:52 +0200 |
commit | f4e38b5cd232cefa63ec6ca901efb95aad87c2c3 (patch) | |
tree | 3bb0810b1c765ff0c517116690b7a298ac949abe /test/pasta_podman | |
parent | 88c2f08eba342d52bf722533d270f0c84045d41c (diff) | |
download | passt-f4e38b5cd232cefa63ec6ca901efb95aad87c2c3.tar passt-f4e38b5cd232cefa63ec6ca901efb95aad87c2c3.tar.gz passt-f4e38b5cd232cefa63ec6ca901efb95aad87c2c3.tar.bz2 passt-f4e38b5cd232cefa63ec6ca901efb95aad87c2c3.tar.lz passt-f4e38b5cd232cefa63ec6ca901efb95aad87c2c3.tar.xz passt-f4e38b5cd232cefa63ec6ca901efb95aad87c2c3.tar.zst passt-f4e38b5cd232cefa63ec6ca901efb95aad87c2c3.zip |
netlink: Adjust interface index inside copied nexthop objects too
As pasta duplicates host routes into the target namespaces, interface
indices might not match, so we go through RTA_OIF attributes and fix
them up to match the identifier in the namespace.
But RTA_OIF is not the ony attribute specifying interfaces for routes:
multipath routes use RTA_MULTIPATH attributes with nexthop objects,
which contain in turn interface indices. Fix them up as well.
If we don't, and we have at least two host interfaces, and the host
interface we use as template isn't the first one (hence the
mismatching indices), we'll fail to insert multipath routes with
nexthop objects, and ultimately refuse to start as the kernel
unexpectedly gives us ENODEV.
Link: https://github.com/containers/podman/issues/22192
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'test/pasta_podman')
0 files changed, 0 insertions, 0 deletions