aboutgitcodebugslistschat
path: root/icmp.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-07-26 07:30:57 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-07-26 07:30:57 +0200
commit16b08367a57f5a01af05d1067e2f77b04251e9b7 (patch)
tree84bfde044cb13cd5df7ff7745014e26369e480b9 /icmp.c
parent17765f8de0782de09ebdf79940f934b8ccb83c41 (diff)
downloadpasst-16b08367a57f5a01af05d1067e2f77b04251e9b7.tar
passt-16b08367a57f5a01af05d1067e2f77b04251e9b7.tar.gz
passt-16b08367a57f5a01af05d1067e2f77b04251e9b7.tar.bz2
passt-16b08367a57f5a01af05d1067e2f77b04251e9b7.tar.lz
passt-16b08367a57f5a01af05d1067e2f77b04251e9b7.tar.xz
passt-16b08367a57f5a01af05d1067e2f77b04251e9b7.tar.zst
passt-16b08367a57f5a01af05d1067e2f77b04251e9b7.zip
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>
Diffstat (limited to 'icmp.c')
-rw-r--r--icmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/icmp.c b/icmp.c
index 8f2fdb2..57d954a 100644
--- a/icmp.c
+++ b/icmp.c
@@ -98,7 +98,7 @@ void icmp_sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
icmp_id_map[V6][id].seq = seq;
}
- tap_ip_send(c, &sr6->sin6_addr, IPPROTO_ICMPV6, buf, n);
+ tap_ip_send(c, &sr6->sin6_addr, IPPROTO_ICMPV6, buf, n, 0);
} else {
struct sockaddr_in *sr4 = (struct sockaddr_in *)&sr;
struct icmphdr *ih = (struct icmphdr *)buf;
@@ -115,7 +115,7 @@ void icmp_sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
memcpy(&a6.s6_addr[12], &sr4->sin_addr, sizeof(sr4->sin_addr));
- tap_ip_send(c, &a6, IPPROTO_ICMP, buf, n);
+ tap_ip_send(c, &a6, IPPROTO_ICMP, buf, n, 0);
}
}