summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2023-05-05 12:37:19 +0000
committerFelix Fietkau2023-05-05 12:37:21 +0000
commitfaaf9cee6ef4cd0f5e38713fa18824e9eef535e5 (patch)
treea72d0785b6159779b4c89a8665a624ed1a134af6
parent412d03012f13ca1de7b16e2b73960df4cbb6279f (diff)
downloadunetd-faaf9cee6ef4cd0f5e38713fa18824e9eef535e5.tar.gz
utils: fix ipv4 checksum issue
The parameter order for protocol and length was accidentally reversed, leading to issues for packets > 256 bytes Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index 704bc57..90cdfe5 100644
--- a/utils.c
+++ b/utils.c
@@ -200,7 +200,7 @@ uint64_t unet_gettime(void)
}
static inline uint32_t
-csum_tcpudp_nofold(uint32_t saddr, uint32_t daddr, uint32_t len, uint8_t proto)
+csum_tcpudp_nofold(uint32_t saddr, uint32_t daddr, uint8_t proto, uint32_t len)
{
uint64_t sum = 0;