Date: Mon, 3 Feb 1997 01:24:25 -0800 (PST) From: bartel@informatik.tu-muenchen.de To: freebsd-gnats-submit@freebsd.org Subject: bin/2642: Problem in /usr/src/libexec/bootpd/bootpgw/bootpgw.c Message-ID: <199702030924.BAA17215@freefall.freebsd.org> Resent-Message-ID: <199702030930.BAA17399@freefall.freebsd.org>
index | next in thread | raw e-mail
>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:
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702030924.BAA17215>
