Remove two incorrect ntoh's which make a comparison of a constant w/ a

value from a packet not work right (only one of them needs ntoh!).

Fixes a bug reported by David Brownlee, and which has been present
in NetAtalk from the Sun 4 port (and thus FreeBSD and OpenBSD too).
This commit is contained in:
wrstuden 1998-06-10 00:43:58 +00:00
parent f8e69a4627
commit 9e4ad7086e

View File

@ -1,4 +1,4 @@
/* $NetBSD: ddp_input.c,v 1.2 1997/04/02 21:47:03 christos Exp $ */
/* $NetBSD: ddp_input.c,v 1.3 1998/06/10 00:43:58 wrstuden Exp $ */
/*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
@ -224,8 +224,8 @@ ddp_input(m, ifp, elh, phase)
ntohs(aa->aa_firstnet) ||
ntohs(to.sat_addr.s_net) >
ntohs(aa->aa_lastnet)) &&
(ntohs(to.sat_addr.s_net) < ntohs(0xff00) ||
ntohs(to.sat_addr.s_net) > ntohs(0xfffe)))
(ntohs(to.sat_addr.s_net) < 0xff00 ||
ntohs(to.sat_addr.s_net) > 0xfffe))
continue;
if (to.sat_addr.s_node !=