Minor corrections
This commit is contained in:
parent
eb24eece0e
commit
6714ec745a
@ -247,6 +247,7 @@ static void ipv4_tx_csum ( struct pk_buff *pkb,
|
|||||||
pshdr.dest = iphdr->dest;
|
pshdr.dest = iphdr->dest;
|
||||||
pshdr.zero_padding = 0x00;
|
pshdr.zero_padding = 0x00;
|
||||||
pshdr.protocol = iphdr->protocol;
|
pshdr.protocol = iphdr->protocol;
|
||||||
|
/* This is only valid when IPv4 does not have options */
|
||||||
pshdr.len = htons ( pkb_len ( pkb ) - sizeof ( *iphdr ) );
|
pshdr.len = htons ( pkb_len ( pkb ) - sizeof ( *iphdr ) );
|
||||||
|
|
||||||
/* Update the checksum value */
|
/* Update the checksum value */
|
||||||
|
@ -570,7 +570,7 @@ int tcp_send ( struct tcp_connection *conn, const void *data, size_t len ) {
|
|||||||
tcphdr->win = htons ( conn->rcv_win );
|
tcphdr->win = htons ( conn->rcv_win );
|
||||||
/* Set urgent pointer to 0 */
|
/* Set urgent pointer to 0 */
|
||||||
tcphdr->urg = 0;
|
tcphdr->urg = 0;
|
||||||
/* Calculate and store partial checksum, in network byte order */
|
/* Calculate and store partial checksum, in host byte order */
|
||||||
tcphdr->csum = 0;
|
tcphdr->csum = 0;
|
||||||
tcphdr->csum = tcpip_chksum ( pkb->data, pkb_len ( pkb ) );
|
tcphdr->csum = tcpip_chksum ( pkb->data, pkb_len ( pkb ) );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user