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,6 +247,7 @@ static void ipv4_tx_csum ( struct pk_buff *pkb,
247 247
 	pshdr.dest = iphdr->dest;
248 248
 	pshdr.zero_padding = 0x00;
249 249
 	pshdr.protocol = iphdr->protocol;
250
+	/* This is only valid when IPv4 does not have options */
250 251
 	pshdr.len = htons ( pkb_len ( pkb ) - sizeof ( *iphdr ) );
251 252
 
252 253
 	/* Update the checksum value */

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

@@ -570,7 +570,7 @@ int tcp_send ( struct tcp_connection *conn, const void *data, size_t len ) {
570 570
 	tcphdr->win = htons ( conn->rcv_win );
571 571
 	/* Set urgent pointer to 0 */
572 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 574
 	tcphdr->csum = 0;
575 575
 	tcphdr->csum = tcpip_chksum ( pkb->data, pkb_len ( pkb ) );
576 576
 	

Loading…
Cancel
Save