Browse Source

Minor corrections

tags/v0.9.3
Nikhil Chandru Rao 18 years ago
parent
commit
6714ec745a
2 changed files with 2 additions and 1 deletions
  1. 1
    0
      src/net/ipv4.c
  2. 1
    1
      src/net/tcp.c

+ 1
- 0
src/net/ipv4.c View File

247
 	pshdr.dest = iphdr->dest;
247
 	pshdr.dest = iphdr->dest;
248
 	pshdr.zero_padding = 0x00;
248
 	pshdr.zero_padding = 0x00;
249
 	pshdr.protocol = iphdr->protocol;
249
 	pshdr.protocol = iphdr->protocol;
250
+	/* This is only valid when IPv4 does not have options */
250
 	pshdr.len = htons ( pkb_len ( pkb ) - sizeof ( *iphdr ) );
251
 	pshdr.len = htons ( pkb_len ( pkb ) - sizeof ( *iphdr ) );
251
 
252
 
252
 	/* Update the checksum value */
253
 	/* Update the checksum value */

+ 1
- 1
src/net/tcp.c View File

570
 	tcphdr->win = htons ( conn->rcv_win );
570
 	tcphdr->win = htons ( conn->rcv_win );
571
 	/* Set urgent pointer to 0 */
571
 	/* Set urgent pointer to 0 */
572
 	tcphdr->urg = 0;
572
 	tcphdr->urg = 0;
573
-	/* Calculate and store partial checksum, in network byte order */
573
+	/* Calculate and store partial checksum, in host byte order */
574
 	tcphdr->csum = 0;
574
 	tcphdr->csum = 0;
575
 	tcphdr->csum = tcpip_chksum ( pkb->data, pkb_len ( pkb ) );
575
 	tcphdr->csum = tcpip_chksum ( pkb->data, pkb_len ( pkb ) );
576
 	
576
 	

Loading…
Cancel
Save