aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-06-18 01:21:25 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-06-18 01:44:41 +0200
commit6489ebbc691f5d97221ad154d570a231e30fb369 (patch)
treeb024468c269c90f31c71d682acddd209389eb577
parentbaf336047c3bb869b3103a6b1b3d8b15e5f1c58d (diff)
downloadslirp-6489ebbc691f5d97221ad154d570a231e30fb369.zip
slirp-6489ebbc691f5d97221ad154d570a231e30fb369.tar.gz
slirp-6489ebbc691f5d97221ad154d570a231e30fb369.tar.bz2
Bump incoming packet alignment to 8 bytes
Fixes #63
-rw-r--r--src/tcpip.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tcpip.h b/src/tcpip.h
index a0fb228..cb5f73f 100644
--- a/src/tcpip.h
+++ b/src/tcpip.h
@@ -89,8 +89,8 @@ struct tcpiphdr {
* size of actual ip+tcp headers, rounded up since we need to align data. */
#define TCPIPHDR_DELTA \
(MAX(0, ((int) sizeof(struct tcpiphdr) - (int) sizeof(struct ip) - \
- (int) sizeof(struct tcphdr) + 3) & \
- ~3))
+ (int) sizeof(struct tcphdr) + 7) & \
+ ~7))
/*
* Just a clean way to get to the first byte