1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-16 20:35:33 +02:00

tap: Fill the IPv6 flow label field to represent flow association

This isn't optional: TCP streams must carry a unique, hard-to-guess,
non-zero label for each direction. Linux, probably among others,
will otherwise refuse to associate packets in a given stream to the
same connection.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-07-26 07:30:57 +02:00
parent 17765f8de0
commit 16b08367a5
5 changed files with 25 additions and 10 deletions

View file

@ -520,7 +520,7 @@ int dhcpv6(struct ctx *c, struct ethhdr *eh, size_t len)
resp_not_on_link.hdr.xid = mh->xid;
tap_ip_send(c, &c->gw6, IPPROTO_UDP,
(char *)&resp_not_on_link, n);
(char *)&resp_not_on_link, n, mh->xid);
return 1;
}
@ -569,7 +569,7 @@ int dhcpv6(struct ctx *c, struct ethhdr *eh, size_t len)
resp.hdr.xid = mh->xid;
tap_ip_send(c, &c->gw6, IPPROTO_UDP, (char *)&resp, n);
tap_ip_send(c, &c->gw6, IPPROTO_UDP, (char *)&resp, n, mh->xid);
c->addr6_seen = c->addr6;
return 1;