IPv6 dhclient does not accept server provided prefix length
name: Bug report
about: Create a report to help us improve
If you believe your bug report is a security issue (e.g. a packet that can kill the server), DO NOT REPORT IT HERE. Please use https://www.isc.org/community/report-bug/ instead or send mail to security-office(at)isc(dot)org. If you really need to report it here, please set the confidential field to true.
Describe the bug IPv6 dhclient does not accept server provided prefix length. It always set it to 128
To Reproduce Steps to reproduce the behavior:
- Run dhclient -6 -nw -cf /etc/dhclient.conf -lf /tmp/dhcp/dhclient6-eth0.leases -pf /tmp/dhcp/dhclient6-eth0.pid eth0
- DHCP server sends the value 64 for prefix-legth
- The dhclient sets the default value 128 , and ignores the value 64 sent by the server
- dhclient's new IPv6 ip is not pingable from the dhcp server machine, since the prefix-length is not matching
Expected behavior dhclient must parse the prefix-length sent from the server and set it to the interface
Environment: Internet Systems Consortium DHCP Client 4.4.1
- OS: Linux 5.4.85
Additional Information My /etc/dhcp/dhcpd6.conf is
subnet6 2001:db8:0:2::/64 { range6 2001:db8:0:2::120 2001:db8:0:2::130; }
IP set by dhclient is
eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 14:0d:4f:68:74:8d brd ff:ff:ff:ff:ff:ff inet6 2001:db8:0:2::126/128 scope global deprecated dynamic valid_lft 2590893sec preferred_lft 0sec inet6 fe80::160d:4fff:fe68:748d/64 scope link valid_lft forever preferred_lft forever
Some initial questions I explored the dhclient code in the isc project and saw that the prefix length is set to 128 by default. What is the reason for the hardcoding? I also saw a forum where this is discussed : https://kb.isc.org/docs/aa-01141 When is the fix is planned to come? My product is using this dhclient and it needs this change at the earliest
Is your feature request related to a problem? Please describe. My product is required to accept the dhcp server sent prefix-length.
Describe the solution you'd like Parse the prefix-length at the dhclient.c and set the {new_ip6_prefixlen} at the dhclient script
Describe alternatives you've considered Alternative is to again hardcode the prefix-length to other value at my dhclient environment using --address-prefix-len option. But that again does not help since its again a hardcoded value
Participating in development No
Contacting you sunithaharish04@gmail.com