mirror of
https://passt.top/passt
synced 2025-06-19 05:25:34 +02:00
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>
This commit is contained in:
parent
8d4baa4446
commit
975cfa5f32
4 changed files with 6 additions and 12 deletions
5
dhcpv6.c
5
dhcpv6.c
|
@ -453,10 +453,7 @@ int dhcpv6(struct ctx *c, const struct pool *p,
|
|||
|
||||
c->ip6.addr_ll_seen = *saddr;
|
||||
|
||||
if (IN6_IS_ADDR_LINKLOCAL(&c->ip6.gw))
|
||||
src = &c->ip6.gw;
|
||||
else
|
||||
src = &c->ip6.our_tap_ll;
|
||||
src = &c->ip6.our_tap_ll;
|
||||
|
||||
mh = packet_get(p, 0, sizeof(*uh), sizeof(*mh), NULL);
|
||||
if (!mh)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue