diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1997-02-07 20:03:49 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1997-02-07 20:03:49 +0000 |
commit | 9a969423ea3210a30f41b39def5873ea550f4b4e (patch) | |
tree | 36b4b87cb78c5e046db06cb8ec0cbe1262085beb /libexec | |
parent | d19c44723dcb3d655e473863ef7b0a1de0f0ac4f (diff) |
Notes
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/bootpd/bootpgw/bootpgw.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libexec/bootpd/bootpgw/bootpgw.c b/libexec/bootpd/bootpgw/bootpgw.c index 353d9173feadc..c2893526261b7 100644 --- a/libexec/bootpd/bootpgw/bootpgw.c +++ b/libexec/bootpd/bootpgw/bootpgw.c @@ -124,7 +124,7 @@ struct timeval actualtimeout = 15 * 60L, /* tv_sec */ 0 /* tv_usec */ }; -u_int maxhops = 4; /* Number of hops allowed for requests. */ +u_char maxhops = 4; /* Number of hops allowed for requests. */ u_int minwait = 3; /* Number of seconds client must wait before its bootrequest packets are forwarded. */ @@ -281,7 +281,7 @@ main(argc, argv) "bootpgw: invalid hop count limit\n"); break; } - maxhops = (u_int)n; + maxhops = (u_char)n; break; case 'i': /* inetd mode */ @@ -528,7 +528,8 @@ static void handle_request() { struct bootp *bp = (struct bootp *) pktbuf; - u_short secs, hops; + u_short secs; + u_char hops; /* XXX - SLIP init: Set bp_ciaddr = recv_addr here? */ @@ -542,13 +543,13 @@ handle_request() 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)); return; } - bp->bp_hops = htons(hops); + bp->bp_hops = hops; /* * Here one might discard a request from the same subnet as the |