From 851e3892fcef7ef98b5690c8b28fcc7e06bf2ad1 Mon Sep 17 00:00:00 2001 From: mycroft Date: Thu, 1 Feb 1996 21:27:46 +0000 Subject: [PATCH] If __FreeBSD__, don't swap the length field in the 802.3 header. --- usr.sbin/rbootd/rmpproto.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rbootd/rmpproto.c b/usr.sbin/rbootd/rmpproto.c index 19be935b1cec..12a6f5cb1777 100644 --- a/usr.sbin/rbootd/rmpproto.c +++ b/usr.sbin/rbootd/rmpproto.c @@ -1,4 +1,4 @@ -/* $NetBSD: rmpproto.c,v 1.6 1995/11/14 08:41:46 thorpej Exp $ */ +/* $NetBSD: rmpproto.c,v 1.7 1996/02/01 21:27:46 mycroft Exp $ */ /* * Copyright (c) 1988, 1992 The University of Utah and the Center @@ -48,7 +48,7 @@ #ifndef lint /*static char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93";*/ -static char rcsid[] = "$NetBSD: rmpproto.c,v 1.6 1995/11/14 08:41:46 thorpej Exp $"; +static char rcsid[] = "$NetBSD: rmpproto.c,v 1.7 1996/02/01 21:27:46 mycroft Exp $"; #endif /* not lint */ #include @@ -574,7 +574,12 @@ SendPacket(rconn) */ bcopy((char *)&rconn->rmp.hp_hdr.saddr[0], (char *)&rconn->rmp.hp_hdr.daddr[0], RMP_ADDRLEN); +#ifdef __FreeBSD__ + /* BPF (incorrectly) wants this in host order. */ + rconn->rmp.hp_hdr.len = rconn->rmplen - sizeof(struct hp_hdr); +#else rconn->rmp.hp_hdr.len = htons(rconn->rmplen - sizeof(struct hp_hdr)); +#endif /* * Reverse 802.2/HP Extended Source & Destination Access Pts.