Commit 905fbeda authored by Cedric Roux's avatar Cedric Roux

Fix checksum computation in the nasmesh driver.


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7283 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 90504d10
......@@ -230,7 +230,7 @@ void nas_COMMON_receive(uint16_t dlen,
case IPPROTO_TCP:
cksum = (uint16_t*)&(((struct tcphdr*)((network_header + (network_header->ihl<<2))))->check);
cksum = (uint16_t*)&(((struct tcphdr*)(((char *)network_header + (network_header->ihl<<2))))->check);
//check = csum_tcpudp_magic(((struct iphdr *)network_header)->saddr, ((struct iphdr *)network_header)->daddr, tcp_hdrlen(skb), IPPROTO_TCP, ~(*cksum));
#ifdef NAS_DEBUG_RECEIVE
......@@ -255,7 +255,7 @@ void nas_COMMON_receive(uint16_t dlen,
case IPPROTO_UDP:
cksum = (uint16_t*)&(((struct udphdr*)((network_header + (network_header->ihl<<2))))->check);
cksum = (uint16_t*)&(((struct udphdr*)(((char *)network_header + (network_header->ihl<<2))))->check);
// check = csum_tcpudp_magic(((struct iphdr *)network_header)->saddr, ((struct iphdr *)network_header)->daddr, udp_hdr(skb)->len, IPPROTO_UDP, ~(*cksum));
#ifdef NAS_DEBUG_RECEIVE
printk("[NAS][COMMON] Inst %d UDP packet CS = %x (before), SA (%x)%x, DA (%x)%x\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment