From 16b08367a57f5a01af05d1067e2f77b04251e9b7 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Mon, 26 Jul 2021 07:30:57 +0200 Subject: 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 --- dhcpv6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dhcpv6.c') diff --git a/dhcpv6.c b/dhcpv6.c index 31ef66d..f982cde 100644 --- a/dhcpv6.c +++ b/dhcpv6.c @@ -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; -- cgit v1.2.3