diff --git a/CHANGELOG b/CHANGELOG index 140fd975..36c55d5a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -424,13 +424,14 @@ HISTORY ++ Bug fixes: + 2007-10-09 Simon Goldschmidt + * udp.c, inet.c, inet.h: Fixed UDPLite: send: Checksum was always generated too + short and also was generated wrong if checksum coverage != tot_len; + receive: checksum was calculated wrong if checksum coverage != tot_len + 2007-10-08 Simon Goldschmidt * mem.c: lfree was not updated in mem_realloc! - 2007-10-07 Simon Goldschmidt - * udp.c, inet.c, inet.h: Fixed UDPLite SENDING: Checksum was always generated - too short and also was generated wrong if checksum coverage != tot_len. - 2007-10-07 Frédéric Bernon * sockets.c, api.h, api_lib.c: First step to fix "bug #20900 : Potential crash error problem with netconn_peer & netconn_addr". VERY IMPORTANT: diff --git a/src/core/udp.c b/src/core/udp.c index e0c472b8..437cdb1f 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -205,9 +205,9 @@ udp_input(struct pbuf *p, struct netif *inp) goto end; } } - if (inet_chksum_pseudo(p, (struct ip_addr *)&(iphdr->src), + if (inet_chksum_pseudo_partial(p, (struct ip_addr *)&(iphdr->src), (struct ip_addr *)&(iphdr->dest), - IP_PROTO_UDPLITE, chklen) != 0) { + IP_PROTO_UDPLITE, p->tot_len, chklen) != 0) { LWIP_DEBUGF(UDP_DEBUG | 2, ("udp_input: UDP Lite datagram discarded due to failing checksum\n")); UDP_STATS_INC(udp.chkerr);