Fix bug #52949: udp_input() checksum error for LWIP_CHECKSUM_CTRL_PER_NETIF

This commit is contained in:
goldsimon 2018-01-22 19:51:45 +01:00
parent 84fcd6290e
commit 5b75ad9019

View File

@ -309,7 +309,7 @@ udp_input(struct pbuf *p, struct netif *inp)
if (for_us) { if (for_us) {
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_input: calculating checksum\n")); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_input: calculating checksum\n"));
#if CHECKSUM_CHECK_UDP #if CHECKSUM_CHECK_UDP
IF__NETIF_CHECKSUM_ENABLED(inp, CHECKSUM_CHECK_UDP) { IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_UDP) {
#if LWIP_UDPLITE #if LWIP_UDPLITE
if (ip_current_header_proto() == IP_PROTO_UDPLITE) { if (ip_current_header_proto() == IP_PROTO_UDPLITE) {
/* Do the UDP Lite checksum */ /* Do the UDP Lite checksum */