git: 9front

Download patch

ref: a1bea530d1d28fb1ae27d50f56a2f5fb6c92e3a3
parent: 2b384fcdff160144b39d9bc73ace1c09188ccb70
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue May 23 02:57:48 EDT 2023

fix previous MERGE commit... why did that modify ipaux?

--- a/sys/src/cmd/ip/ppp/ipaux.c
+++ b/sys/src/cmd/ip/ppp/ipaux.c
@@ -8,18 +8,10 @@
 ptclcsum(Block *bp, int offset, int len)
 {
 	uchar *addr;
-	ulong losum, hisum;
-	ushort csum;
-	int odd, blen, x;
+	int blen;
 
-	/* Correct to front of data area */
-	while(bp != nil && offset && offset >= BLEN(bp)) {
-		offset -= BLEN(bp);
-		bp = bp->next;
-	}
-	if(bp == nil)
+	if(bp == nil || bp->rptr + offset >= bp->wptr)
 		return 0;
-
 	addr = bp->rptr + offset;
 	blen = BLEN(bp) - offset;
 	if(blen < len)
--