Page MenuHomeVyOS Platform

DHCPv6 does not have prefix range validation
Open, HighPublicBUG

Description

Reproducing steps:

set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 address-range start 2001:db8:3456::100 stop '2001:db8:3456::1ff'
set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 name-server '2001:db8:daad::1'
set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 prefix-delegation start 2001:db8:290::500 prefix-length '64'
set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 prefix-delegation start 2001:db8:290::500 stop '2001:db8:290::5ff'

It allows to apply the setting, but DHCPv6 server does not start and die with error in logs

Apr 23 11:30:01 vyos systemd[1]: Starting ISC DHCP IPv6 server...
Apr 23 11:30:01 vyos dhcpd[8404]: /run/dhcp-server/dhcpdv6.conf line 13: network mask too short
Apr 23 11:30:01 vyos dhcpd[8404]:         prefix6 2001:db8:290::500 2001:db8:290::5ff/64;
Apr 23 11:30:01 vyos dhcpd[8404]:                                                     ^
Apr 23 11:30:01 vyos dhcpd[8404]: Configuration file errors encountered -- exiting
Apr 23 11:30:01 vyos dhcpd[8404]: 
Apr 23 11:30:01 vyos dhcpd[8404]: If you think you have received this message due to a bug rather
Apr 23 11:30:01 vyos dhcpd[8404]: than a configuration issue please read the section on submitting
Apr 23 11:30:01 vyos dhcpd[8404]: bugs on either our web page at www.isc.org or in the README file
Apr 23 11:30:01 vyos dhcpd[8404]: before submitting a bug.  These pages explain the proper
Apr 23 11:30:01 vyos dhcpd[8404]: process and the information we find helpful for debugging.
Apr 23 11:30:01 vyos dhcpd[8404]: 
Apr 23 11:30:01 vyos dhcpd[8404]: exiting.

Details

Difficulty level
Normal (likely a few hours)
Version
1.4-rolling-202104221210
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Unspecified (please specify)

Event Timeline

Unknown Object (User) created this task.Apr 23 2021, 1:55 PM
dmbaturin set Issue type to Unspecified (please specify).
dmbaturin added a subscriber: dmbaturin.

Should be easy to do now that ipaddrcheck supports range validation.