From 4b2e018d70f33d1e337b039d620823a020711ba5 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 22 Jul 2022 15:31:12 +1000 Subject: Allow different external interfaces for IPv4 and IPv6 connectivity It's quite plausible for a host to have both IPv4 and IPv6 connectivity, but only via different interfaces. For example, this will happen in the case that IPv6 connectivity is via a tunnel (e.g. 6in4 or 6rd). It would also happen in the case that IPv4 access is via a tunnel on an otherwise IPv6 only local network, which is a setup that might become more common in the post IPv4 address exhaustion world. In turns out there's no real need for passt/pasta to get its IPv4 and IPv6 connectivity via the same interface, so we can handle this situation fairly easily. Change the core to allow eparate external interfaces for IPv4 and IPv6. We don't actually set these separately for now. Signed-off-by: David Gibson --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util.c') diff --git a/util.c b/util.c index 2eea0ef..f4ec102 100644 --- a/util.c +++ b/util.c @@ -280,7 +280,7 @@ int sock_l4(const struct ctx *c, int af, uint8_t proto, if (!memcmp(bind_addr, &c->addr6_ll, sizeof(c->addr6_ll))) - addr6.sin6_scope_id = c->ifi; + addr6.sin6_scope_id = c->ifi6; } else { addr6.sin6_addr = in6addr_any; } -- cgit v1.2.3