[gPXE-devel] [PATCH 28/31] [ipv6] fix IPv6 checksum psuedo-header creation

matthew at theiselins.net matthew at theiselins.net
Fri Jul 8 10:28:37 EDT 2011


From: Matthew Iselin <matthew at theiselins.net>

---
 src/net/ipv6.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/net/ipv6.c b/src/net/ipv6.c
index a58b5fc..fe8c7af 100644
--- a/src/net/ipv6.c
+++ b/src/net/ipv6.c
@@ -216,7 +216,7 @@ static uint16_t ipv6_tx_csum ( struct io_buffer *iobuf, uint16_t csum ) {
 	memset ( &pshdr, 0, sizeof ( pshdr ) );
 	pshdr.src = ip6hdr->src;
 	pshdr.dest = ip6hdr->dest;
-	pshdr.len = htons ( iob_len ( iobuf ) - sizeof ( *ip6hdr ) );
+	pshdr.len = ip6hdr->payload_len;
 	pshdr.nxt_hdr = ip6hdr->nxt_hdr;
 
 	/* Update checksum value */
@@ -411,7 +411,6 @@ static int ipv6_process_nxt_hdr ( struct io_buffer *iobuf, uint8_t nxt_hdr,
 static int ipv6_rx ( struct io_buffer *iobuf,
 		     __unused struct net_device *netdev,
 		     __unused const void *ll_source ) {
-
 	struct ip6_header *ip6hdr = iobuf->data;
 	union {
 		struct sockaddr_in6 sin6;
-- 
1.7.2.5



More information about the gPXE-devel mailing list