aboutgitcodebugslistschat
path: root/util.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-07-22 15:31:12 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-07-30 21:50:41 +0200
commit4b2e018d70f33d1e337b039d620823a020711ba5 (patch)
treef72ac2374fc672988aa7f9d0a086d26f41bc9ac3 /util.c
parent0aae39d73a09eb32adc621acbbc98ac6f86b4ad1 (diff)
downloadpasst-4b2e018d70f33d1e337b039d620823a020711ba5.tar
passt-4b2e018d70f33d1e337b039d620823a020711ba5.tar.gz
passt-4b2e018d70f33d1e337b039d620823a020711ba5.tar.bz2
passt-4b2e018d70f33d1e337b039d620823a020711ba5.tar.lz
passt-4b2e018d70f33d1e337b039d620823a020711ba5.tar.xz
passt-4b2e018d70f33d1e337b039d620823a020711ba5.tar.zst
passt-4b2e018d70f33d1e337b039d620823a020711ba5.zip
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 <david@gibson.dropbear.id.au>
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
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;
}