aboutgitcodebugslistschat
path: root/tap.c
diff options
context:
space:
mode:
Diffstat (limited to 'tap.c')
-rw-r--r--tap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tap.c b/tap.c
index f082901..9c197cb 100644
--- a/tap.c
+++ b/tap.c
@@ -183,9 +183,8 @@ void tap_ip_send(const struct ctx *c, const struct in6_addr *src, uint8_t proto,
} else if (proto == IPPROTO_UDP) {
struct udphdr *uh = (struct udphdr *)(ip6h + 1);
- uh->check = 0;
- uh->check = csum_unaligned(ip6h, len + sizeof(*ip6h),
- 0);
+ csum_udp6(uh, &ip6h->saddr, &ip6h->daddr,
+ uh + 1, len - sizeof(*uh));
} else if (proto == IPPROTO_ICMPV6) {
struct icmp6hdr *ih = (struct icmp6hdr *)(ip6h + 1);