From a931882e8ee78632b5954d02f3cf5973b4c238db Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Sun, 17 Nov 2002 12:00:00 -0500 Subject: [PATCH] Application of mopd-2.5.3-length.patch: * Sun Nov 17 2002 Maciej W. Rozycki 2.5.3-14 - handle MOP packet buffer length as specified (length) Downloaded from: ftp://ftp.linux-mips.org/pub/linux/mips/people/macro/mopd/mopd-2.5.3-length.patch.gz .patch SHA256 = 9da2f8c4c7def6965f9db9427e417e4fa025aaccf326e90193c069a77e9bbc90 Patch history copied from: ftp://ftp.linux-mips.org/pub/linux/mips/people/macro/mopd/mopd-2.5.3-15.spec --- mopd/process.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mopd/process.c b/mopd/process.c index 1eb5bd3..f64c897 100644 --- a/mopd/process.c +++ b/mopd/process.c @@ -47,7 +47,7 @@ static char rcsid[] = "$Id: process.c,v 1.21 1996/08/22 17:04:07 moj Exp $"; #define SEND_REAL_HOSTNAME -#define MAX_ETH_PAYLOAD 1492 +#define MAX_ETH_PAYLOAD 1500 extern u_char buf[]; extern int DebugFlag; @@ -276,11 +276,15 @@ mopStartLoad(dst, src, dl_rpr, trans) if (dllist[slot].dl_bsz >= MAX_ETH_PAYLOAD) dllist[slot].dl_bsz = MAX_ETH_PAYLOAD; if (dllist[slot].dl_bsz == 1030) /* VS/uVAX 2000 needs this */ - dllist[slot].dl_bsz = 1000; + dllist[slot].dl_bsz = 1010; if (dllist[slot].dl_bsz == 0) /* Needed by "big" VAXen */ - dllist[slot].dl_bsz = MAX_ETH_PAYLOAD; + dllist[slot].dl_bsz = MOP_K_DLBSZ_DEFAULT; if (trans == TRANS_8023) - dllist[slot].dl_bsz = dllist[slot].dl_bsz - 8; + if (dllist[slot].dl_bsz > MAX_ETH_PAYLOAD - 8) + dllist[slot].dl_bsz = MAX_ETH_PAYLOAD - 8; + if (trans == TRANS_ETHER) + dllist[slot].dl_bsz -= 2; /* For packet length */ + dllist[slot].dl_bsz -= 6; /* For Memory Load header */ index = 0; mopPutHeader(pkt, &index, dst, src, ptype, trans);