1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Accept odd length ipx packets. (Win95 and some dialup servers use it.)

Original idea submitted by:	Atsushi Murai <amurai@spec.co.jp>
This commit is contained in:
John Hay 1996-08-18 08:38:15 +00:00
parent 8a4f8ad912
commit e819bbbca4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17643

View File

@ -33,7 +33,7 @@
*
* @(#)ipx_input.c
*
* $Id: ipx_input.c,v 1.7 1996/01/05 20:47:04 wollman Exp $
* $Id: ipx_input.c,v 1.8 1996/03/11 15:13:48 davidg Exp $
*/
#include <sys/param.h>
@ -138,7 +138,7 @@ ipxintr()
register struct ipxpcb *ipxp;
register int i;
int len, s, error;
char oddpacketp;
char oddshortpacket = 0;
next:
/*
@ -167,9 +167,13 @@ ipxintr()
ipx = mtod(m, struct ipx *);
len = ntohs(ipx->ipx_len);
if (oddpacketp = len & 1) {
len++; /* If this packet is of odd length,
preserve garbage byte for checksum */
if ((len < m->m_pkthdr.len) && (oddshortpacket = len & 1)) {
/*
* If this packet is of odd length, and the length
* inside the header is less than the received packet
* length, preserve garbage byte for possible checksum.
*/
len++;
}
/*
@ -241,7 +245,7 @@ ipxintr()
*/
ipxintr_swtch++;
if (ipxp) {
if (oddpacketp) {
if (oddshortpacket) {
m_adj(m, -1);
}
if ((ipxp->ipxp_flags & IPXP_ALL_PACKETS)==0)