From owner-freebsd-bugs Mon Feb 3 01:30:06 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id BAA17406 for bugs-outgoing; Mon, 3 Feb 1997 01:30:06 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id BAA17399; Mon, 3 Feb 1997 01:30:03 -0800 (PST) Resent-Date: Mon, 3 Feb 1997 01:30:03 -0800 (PST) Resent-Message-Id: <199702030930.BAA17399@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, Received:(from nobody@localhost) by.freefall.freebsd.org.id.BAA17215;Mon; (8.8.5/8.8.5);, 3 Feb 1997 01:24:25.-0800 (PST) Message-Id: <199702030924.BAA17215@freefall.freebsd.org> Date: Mon, 3 Feb 1997 01:24:25 -0800 (PST) From: bartel@informatik.tu-muenchen.de To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: bin/2642: Problem in /usr/src/libexec/bootpd/bootpgw/bootpgw.c Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 2642 >Category: bin >Synopsis: Problem in /usr/src/libexec/bootpd/bootpgw/bootpgw.c >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Feb 3 01:30:02 PST 1997 >Last-Modified: >Originator: Elmar Bartel >Organization: Fakultaet fuer Informatik, Technischen Universitaet Muenchen >Release: 2.2-BETA_A >Environment: FreeBSD bsdhub1 2.2-BETA_A FreeBSD 2.2-BETA_A #0: Tue Dec 24 03:41:49 1996 jkh@time.cdrom.com:/usr/src/sys/compile/GENERIC i386 >Description: The access to bp_hops in the bootp packet was done via ntohs/htons, butit is a one-byte value. So, the hop count is not handled in a correct way. >How-To-Repeat: >Fix: --- bootpgw.c-orig Mon Feb 3 10:12:37 1997 +++ bootpgw.c Mon Feb 3 10:12:30 1997 @@ -530,13 +530,13 @@ return; /* Has this packet hopped too many times? */ - hops = ntohs(bp->bp_hops); + hops = bp->bp_hops; if (++hops > maxhops) { - report(LOG_NOTICE, "reqest from %s reached hop limit", - inet_ntoa(recv_addr.sin_addr)); + report(LOG_NOTICE, "reqest from %s discarded. It had %d hops, limit is %d)", + inet_ntoa(recv_addr.sin_addr), hops, maxhops); return; } - bp->bp_hops = htons(hops); + bp->bp_hops = hops; >Audit-Trail: >Unformatted: