aboutgitcodebugslistschat
path: root/tap.c
diff options
context:
space:
mode:
Diffstat (limited to 'tap.c')
-rw-r--r--tap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tap.c b/tap.c
index 2af1c7a..08b85ff 100644
--- a/tap.c
+++ b/tap.c
@@ -41,6 +41,7 @@
#include <linux/icmp.h>
#include <linux/icmpv6.h>
+#include "checksum.h"
#include "util.h"
#include "passt.h"
#include "arp.h"
@@ -122,7 +123,7 @@ void tap_ip_send(struct ctx *c, struct in6_addr *src, uint8_t proto,
memcpy(&iph->saddr, &src->s6_addr[12], 4);
iph->check = 0;
- iph->check = csum_ip4(iph, iph->ihl * 4);
+ iph->check = csum_unaligned(iph, iph->ihl * 4, 0);
memcpy(data, in, len);