ref: 1cd199fbd188538a7eef7bcc68e8e8d5ef2c5d9f
parent: a8ad9632ff7447b8ca448cc23dfbc60f0e36d8ec
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)