diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-08-21 14:20:08 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-08-21 12:00:13 +0200 |
commit | c9f0ec3227d4861afe7dd8aa4c2eb55ed095586c (patch) | |
tree | 7a98af03a1c23fc6313c58a7a5511a98e8539401 /conf.c | |
parent | 57532f1ded4d850e6184b585567cd327f08368fd (diff) | |
download | passt-c9f0ec3227d4861afe7dd8aa4c2eb55ed095586c.tar passt-c9f0ec3227d4861afe7dd8aa4c2eb55ed095586c.tar.gz passt-c9f0ec3227d4861afe7dd8aa4c2eb55ed095586c.tar.bz2 passt-c9f0ec3227d4861afe7dd8aa4c2eb55ed095586c.tar.lz passt-c9f0ec3227d4861afe7dd8aa4c2eb55ed095586c.tar.xz passt-c9f0ec3227d4861afe7dd8aa4c2eb55ed095586c.tar.zst passt-c9f0ec3227d4861afe7dd8aa4c2eb55ed095586c.zip |
util: Correct sock_l4() binding for link local addresses
When binding an IPv6 socket in sock_l4() we need to supply a scope id
if the address is link-local. We check for this by comparing the
given address to c->ip6.addr_ll. This is correct only by accident:
while c->ip6.addr_ll is typically set to the host interface's link
local address, the actual purpose of it is to provide a link local
address for passt's private use on the tap interface.
Instead set the scope id for any link-local address we're binding to.
We're going to need something and this is what makes sense for sockets
on the host. It doesn't make sense for PIF_SPLICE sockets, but those
should always have loopback, not link-local addresses.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'conf.c')
0 files changed, 0 insertions, 0 deletions