diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-08-21 14:20:11 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-08-21 12:00:22 +0200 |
commit | 975cfa5f3255ae0ece3cdeda33675076b17be1c7 (patch) | |
tree | 079e312e66887f7c738ffe4be48fe60e6d5a0f77 /ndp.c | |
parent | 8d4baa4446c6482d66aa09dfcd6cdbe94f616f76 (diff) | |
download | passt-975cfa5f3255ae0ece3cdeda33675076b17be1c7.tar passt-975cfa5f3255ae0ece3cdeda33675076b17be1c7.tar.gz passt-975cfa5f3255ae0ece3cdeda33675076b17be1c7.tar.bz2 passt-975cfa5f3255ae0ece3cdeda33675076b17be1c7.tar.lz passt-975cfa5f3255ae0ece3cdeda33675076b17be1c7.tar.xz passt-975cfa5f3255ae0ece3cdeda33675076b17be1c7.tar.zst passt-975cfa5f3255ae0ece3cdeda33675076b17be1c7.zip |
Initialise our_tap_ll to ip6.gw when suitable
In every place we use our_tap_ll, we only use it as a fallback if the
IPv6 gateway address is not link-local. We can avoid that conditional at
use time by doing it at initialisation of our_tap_ll instead.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'ndp.c')
-rw-r--r-- | ndp.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -341,10 +341,7 @@ dns_done: else c->ip6.addr_seen = *saddr; - if (IN6_IS_ADDR_LINKLOCAL(&c->ip6.gw)) - rsaddr = &c->ip6.gw; - else - rsaddr = &c->ip6.our_tap_ll; + rsaddr = &c->ip6.our_tap_ll; if (ih->icmp6_type == NS) { dlen = sizeof(struct ndp_na); |