use correct length for UDP checksum calculation

When calculating the UDP checksum, make sure to use host byte order representation of the length field.