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.
This commit is contained in:
parent
d38aa24487
commit
831e32f863
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60141
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user