aboutgitcodebugslistschat
path: root/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'udp.c')
-rw-r--r--udp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/udp.c b/udp.c
index fe3a6cd..45b7cc9 100644
--- a/udp.c
+++ b/udp.c
@@ -671,10 +671,7 @@ static size_t udp_update_hdr6(const struct ctx *c, struct udp6_l2_buf_t *b,
b->uh.source = b->s_in6.sin6_port;
b->uh.dest = htons(dstport);
b->uh.len = b->ip6h.payload_len;
- b->uh.check = 0;
- b->uh.check = csum(&b->uh, payload_len,
- proto_ipv6_header_psum(payload_len, IPPROTO_UDP,
- src, dst));
+ csum_udp6(&b->uh, src, dst, b->data, datalen);
return tap_iov_len(c, &b->taph, payload_len + sizeof(b->ip6h));
}