Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32212f26 authored by Vineeta Srivastava's avatar Vineeta Srivastava Committed by Android (Google) Code Review
Browse files

Merge "libnetutils: Expect 1's complement if computed UDP checksum is zero"

parents 260854c0 1c87ae05
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -230,6 +230,8 @@ int receive_packet(int s, struct dhcp_msg *msg)
    packet.udp.check = 0;
    sum = finish_sum(checksum(&packet, nread, 0));
    packet.udp.check = temp;
    if (!sum)
        sum = finish_sum(sum);
    if (temp != sum) {
        ALOGW("UDP header checksum failure (0x%x should be 0x%x)", sum, temp);
        return -1;