From 204a9e7fbafadf5dfd470354ae48be680eea7a32 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 7 May 2000 14:29:19 +0000 Subject: Include a RFC 1533 "Maximum DHCP Message Size" option in our request. ISC DHCP will limit the reply length to 64 bytes for bootp replies unless we explicitly tell it we can do more. We tell it that we can do 1200 bytes. --- sys/nfs/bootp_subr.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'sys/nfs/bootp_subr.c') diff --git a/sys/nfs/bootp_subr.c b/sys/nfs/bootp_subr.c index 3295248..d580c55 100644 --- a/sys/nfs/bootp_subr.c +++ b/sys/nfs/bootp_subr.c @@ -834,11 +834,23 @@ bootpc_init(void) call.xid = txdr_unsigned(xid); bcopy(LLADDR(sdl),&call.chaddr,sdl->sdl_alen); - call.vend[0]=99; - call.vend[1]=130; - call.vend[2]=83; - call.vend[3]=99; - call.vend[4]=255; + j = 0; + call.vend[j++]=99; + call.vend[j++]=130; + call.vend[j++]=83; + call.vend[j++]=99; + + /* + * We send an RFC 1533 "Maximum DHCP Message Size" option, saying we + * can do 1200 bytes. If we don't ISC DHCPD will limit the answer to + * 64 bytes and root/swap and similar will be dropped. + */ + call.vend[j++]=57; + call.vend[j++]=2; + call.vend[j++]=(1200) % 256; + call.vend[j++]=(1200) / 256; + + call.vend[j++]=255; call.secs = 0; call.flags = htons(0x8000); /* We need an broadcast answer */ -- cgit v1.1