Subject: | DHCPD 4.3.5 - Unable to include all DHCP/BOOTP options in payload |
Date: | Mon, 1 May 2017 15:29:04 +0000 |
To: | dhcp-bugs@isc.org |
From: | "Glen Mui" <glen.mui@genband.com> |
Bug Report from www.isc.org:
Name: Glen Mui
Email: glen.mui@genband.com
Software Version: DHCPD 4.3.5
OS: Linux 2.6.27
Subject:Unable to include all DHCP/BOOTP options in payload
Bug Detail
===========
I am migrating a Solaris server running bootp to a Linux server running ISC dhcpd to support older bootp clients. After the migration it seems that we cannot see all the options being returned to the bootp client that they originally had when interacting with the Solaris bootp server. The dhcpd.conf file has the following content that includes several vendor specific options:
# cat /etc/dhcpd.conf
allow booting;
allow bootp;
always-reply-rfc1048 on;
default-lease-time 100;
max-lease-time 7100;
option T129 code 129 = string;
option T130 code 130 = string;
option T160 code 160 = string;
option T161 code 161 = string;
option T162 code 162 = string;
subnet 169.254.8.0 netmask 255.255.252.0 {
}
host 47.168.102.34.db {
hardware ethernet 08:00:27:70:e5:04;
fixed-address 169.254.8.82;
filename "./cicm/pxelinux.0";
server-name "169.254.8.100";
next-server 169.254.8.100;
option subnet-mask 255.255.252.0;
option routers 47.168.102.33;
option ntp-servers 169.254.8.101,169.254.8.102;
option T129 43:43:30:31:38:41:00;
option T130 2F:A8:66:24:2F:A8:66:25;
option T160 43:31:32:31:30:30:00;
option T161 00;
option T162 2F:A8:2D:88;
}
The tcpdump on the linux server of the bootp reply shows that the ntp-server option is not included in the payload but instead there are 10 bytes of padding following the end option:
21:24:10.459442 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto: UDP (17), length: 328) 169.254.8.100.bootps > 169.254.8.82.bootpc: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0xa2755420, Flags [ none ] (0x0000)
Your-IP 169.254.8.82
Server-IP 169.254.8.100
Client-Ethernet-Address 08:00:27:70:e5:04
sname "169.254.8.100"
file "./cicm/pxelinux.0"
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
Subnet-Mask Option 1, length 4: 255.255.252.0
Default-Gateway Option 3, length 4: 47.168.102.33
T160 Option 160, length 7: 67.49.50.49.48.48.0
T129 Option 129, length 7: 67.67.48.49.56.65.0
T161 Option 161, length 1: 0
T130 Option 130, length 8: 799565348,799565349
T162 Option 162, length 4: 799550856
0x0000: 4510 0148 0000 0000 8011 d4e2 a9fe 0864 E..H...........d
0x0010: a9fe 0852 0043 0044 0134 cd50 0201 0600 ...R.C.D.4.P....
0x0020: a275 5420 0000 0000 0000 0000 a9fe 0852 .uT............R
0x0030: a9fe 0864 0000 0000 0800 2770 e504 0000 ...d......'p....
0x0040: 0000 0000 0000 0000 3136 392e 3235 342e ........169.254.
0x0050: 382e 3130 3000 0000 0000 0000 0000 0000 8.100...........
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0080: 0000 0000 0000 0000 2e2f 6369 636d 2f70 ........./cicm/p
0x0090: 7865 6c69 6e75 782e 3000 0000 0000 0000 xelinux.0.......
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0100: 0000 0000 0000 0000 6382 5363 0104 ffff ........c.Sc....
0x0110: fc00 0304 2fa8 6621 a007 4331 3231 3030 ..../.f!..C12100
0x0120: 0081 0743 4330 3138 4100 a101 0082 082f ...CC018A....../
0x0130: a866 242f a866 25a2 042f a82d 88ff 0000 .f$/.f%../.-....
0x0140: 0000 0000 0000 0000 ........
The ntp-server contains two IP addresses and is 8 bytes in length and thus should have fit in the bootp reply in the space occupied by the padding yet it was left off. If we were to specify only one IP address in the ntp-servers option then the option appears in the bootp reply with 4 bytes of padding:
21:27:58.876523 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto: UDP (17), length: 328) 169.254.8.100.bootps > 169.254.8.82.bootpc: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0xce0c607c, Flags [ none ] (0x0000)
Your-IP 169.254.8.82
Server-IP 169.254.8.100
Client-Ethernet-Address 08:00:27:70:e5:04
sname "169.254.8.100"
file "./cicm/pxelinux.0"
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
Subnet-Mask Option 1, length 4: 255.255.252.0
Default-Gateway Option 3, length 4: 47.168.102.33
T160 Option 160, length 7: 67.49.50.49.48.48.0
T129 Option 129, length 7: 67.67.48.49.56.65.0
T161 Option 161, length 1: 0
T130 Option 130, length 8: 799565348,799565349
T162 Option 162, length 4: 799550856
NTP Option 42, length 4: 169.254.8.101
0x0000: 4510 0148 0000 0000 8011 d4e2 a9fe 0864 E..H...........d
0x0010: a9fe 0852 0043 0044 0134 2d81 0201 0600 ...R.C.D.4-.....
0x0020: ce0c 607c 0000 0000 0000 0000 a9fe 0852 ..`|...........R
0x0030: a9fe 0864 0000 0000 0800 2770 e504 0000 ...d......'p....
0x0040: 0000 0000 0000 0000 3136 392e 3235 342e ........169.254.
0x0050: 382e 3130 3000 0000 0000 0000 0000 0000 8.100...........
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0080: 0000 0000 0000 0000 2e2f 6369 636d 2f70 ........./cicm/p
0x0090: 7865 6c69 6e75 782e 3000 0000 0000 0000 xelinux.0.......
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0100: 0000 0000 0000 0000 6382 5363 0104 ffff ........c.Sc....
0x0110: fc00 0304 2fa8 6621 a007 4331 3231 3030 ..../.f!..C12100
0x0120: 0081 0743 4330 3138 4100 a101 0082 082f ...CC018A....../
0x0130: a866 242f a866 25a2 042f a82d 882a 04a9 .f$/.f%../.-.*..
0x0140: fe08 65ff 0000 0000 ..e.....
It would seem to me that the available space in the options buffer is not being calculated properly. Perhaps there is space being reserved for the overload option that is supported for dhcp clients but may not be for bootp clients.
Please advise.
Thanks
Glen
---
This email was received through isc.org Bug Submission Form