diff --git a/sys/net/destiny/socket.c b/sys/net/destiny/socket.c index b22d88102e..f2ecfa000a 100644 --- a/sys/net/destiny/socket.c +++ b/sys/net/destiny/socket.c @@ -1013,8 +1013,10 @@ int32_t destiny_socket_sendto(int s, const void *buf, uint32_t len, int flags, current_udp_packet->length = HTONS(UDP_HDR_LEN + len); temp_ipv6_header->length = UDP_HDR_LEN + len; - current_udp_packet->checksum = ~udp_csum(temp_ipv6_header, - current_udp_packet); + current_udp_packet->checksum = ~ipv6_csum(temp_ipv6_header, + (uint8_t*) current_udp_packet, + UDP_HDR_LEN + len, + IPPROTO_UDP); ipv6_sendto(&to->sin6_addr, IPPROTO_UDP, (uint8_t *)(current_udp_packet), diff --git a/sys/net/destiny/udp.c b/sys/net/destiny/udp.c index 4cf6c31a61..b82043da0b 100644 --- a/sys/net/destiny/udp.c +++ b/sys/net/destiny/udp.c @@ -58,7 +58,7 @@ void udp_packet_handler(void) udp_header = ((udp_hdr_t *)(m_recv_ip.content.ptr + IPV6_HDR_LEN)); payload = (uint8_t *)(m_recv_ip.content.ptr + IPV6_HDR_LEN + UDP_HDR_LEN); - chksum = udp_csum(ipv6_header, udp_header); + chksum = ipv6_csum(ipv6_header, (uint8_t*) udp_header, NTOHS(udp_header->length), IPPROTO_UDP); if (chksum == 0xffff) { udp_socket = get_udp_socket(ipv6_header, udp_header);