From 194803a3a7cb856ef31ef296d609fc3ed57000bf Mon Sep 17 00:00:00 2001 From: goldsimon Date: Tue, 7 Mar 2017 20:37:06 +0100 Subject: [PATCH] netbuf: correctly reset netbuf checksum for LWIP_CHECKSUM_ON_COPY==1 --- src/api/netbuf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/netbuf.c b/src/api/netbuf.c index eb250115..3e87178e 100644 --- a/src/api/netbuf.c +++ b/src/api/netbuf.c @@ -131,6 +131,10 @@ netbuf_free(struct netbuf *buf) pbuf_free(buf->p); } buf->p = buf->ptr = NULL; +#if LWIP_CHECKSUM_ON_COPY + buf->flags = 0; + buf->toport_chksum = 0; +#endif /* LWIP_CHECKSUM_ON_COPY */ } /**