aboutgitcodebugslistschat
path: root/netlink.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-07-22 15:31:13 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-07-30 21:57:50 +0200
commit06abfcf6d95762976d37aa5721c16802c649efd4 (patch)
tree38b2b7936c0a107015706dd3feadc2021edab13a /netlink.h
parent3eaf9f532021326a47f70046b05854d8b1819825 (diff)
downloadpasst-06abfcf6d95762976d37aa5721c16802c649efd4.tar
passt-06abfcf6d95762976d37aa5721c16802c649efd4.tar.gz
passt-06abfcf6d95762976d37aa5721c16802c649efd4.tar.bz2
passt-06abfcf6d95762976d37aa5721c16802c649efd4.tar.lz
passt-06abfcf6d95762976d37aa5721c16802c649efd4.tar.xz
passt-06abfcf6d95762976d37aa5721c16802c649efd4.tar.zst
passt-06abfcf6d95762976d37aa5721c16802c649efd4.zip
Separately locate external interfaces for IPv4 and IPv6
Now that the back end allows passt/pasta to use different external interfaces for IPv4 and IPv6, use that to do the right thing in the case that the host has IPv4 and IPv6 connectivity via different interfaces. If the user hasn't explicitly chosen an interface, separately search for a suitable external interface for each protocol. As a bonus, this substantially simplifies the external interface probe. It also eliminates a subtle confusing case where in some circumstances we would pick the first interface in interface index order, and sometimes in order of routes returned from netlink. On some network configurations that could cause tests to fail, because the logic in the tests was subtly different (it always used route order). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'netlink.h')
-rw-r--r--netlink.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/netlink.h b/netlink.h
index 261904e..5ce5037 100644
--- a/netlink.h
+++ b/netlink.h
@@ -7,7 +7,7 @@
#define NETLINK_H
int nl_sock_init(const struct ctx *c);
-unsigned int nl_get_ext_if(int *v4, int *v6);
+unsigned int nl_get_ext_if(sa_family_t af);
void nl_route(int ns, unsigned int ifi, sa_family_t af, void *gw);
void nl_addr(int ns, unsigned int ifi, sa_family_t af,
void *addr, int *prefix_len, void *addr_l);