From: Ben Gras Date: Wed, 22 Jun 2005 15:22:34 +0000 (+0000) Subject: Workaround for fishy situation that caused checksum on outgoing packets X-Git-Tag: v3.1.0~713 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=4ab7f34ea03a6423705c2460f3870323c3fbbff5;p=minix.git Workaround for fishy situation that caused checksum on outgoing packets to be broken in certain cases. (Seemingly when 2 short packets sent back-to-back.) Buffer alignment seems to fix this ... --- diff --git a/drivers/fxp/fxp.c b/drivers/fxp/fxp.c index 8dfca6a1c..91f0b8ffa 100644 --- a/drivers/fxp/fxp.c +++ b/drivers/fxp/fxp.c @@ -806,10 +806,10 @@ fxp_t *fp; assert(first_time); first_time= 0; -#if 0 - assert(tot_bufsize <= buffer); -#endif +#define BUFALIGN 4096 + assert(tot_bufsize <= sizeof(buffer)-BUFALIGN); buf= (phys_bytes)buffer; + buf += BUFALIGN - (buf % BUFALIGN); } fp->fxp_rx_buf= (struct rfd *)buf;