Page MenuHomeVyOS Platform

DHCP server commit fails if static-mapping contains + or .
Closed, ResolvedPublicBUG

Description

Nov 10 19:16:25 AC1 dhcpd[458351]: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
Nov 10 19:16:25 AC1 dhcpd[458351]: /tmp/dhcpd.conf line 29: expecting left brace.
Nov 10 19:16:25 AC1 dhcpd[458351]:         host VYOS-NET_fooo+
Nov 10 19:16:25 AC1 dhcpd[458351]:                                  ^
Nov 10 19:16:25 AC1 dhcpd[458351]: Configuration file errors encountered -- exiting
Nov 10 19:16:25 AC1 dhcpd[458351]:
Nov 10 19:16:25 AC1 dhcpd[458351]: If you think you have received this message due to a bug rather
Nov 10 19:16:25 AC1 dhcpd[458351]: than a configuration issue please read the section on submitting
Nov 10 19:16:25 AC1 dhcpd[458351]: bugs on either our web page at www.isc.org or in the README file
Nov 10 19:16:25 AC1 dhcpd[458351]: before submitting a bug.  These pages explain the proper
Nov 10 19:16:25 AC1 dhcpd[458351]: process and the information we find helpful for debugging.
Nov 10 19:16:25 AC1 dhcpd[458351]:
Nov 10 19:16:25 AC1 dhcpd[458351]: exiting.

To reproduce:

set service dhcp-server shared-network-name VYOS-NET authoritative
set service dhcp-server shared-network-name VYOS-NET subnet 172.16.110.0/24 default-router '172.16.110.254'
set service dhcp-server shared-network-name VYOS-NET subnet 172.16.110.0/24 name-server '172.16.254.100'
set service dhcp-server shared-network-name VYOS-NET subnet 172.16.110.0/24 static-mapping fooo+bar-baz ip-address '172.16.110.30'
set service dhcp-server shared-network-name VYOS-NET subnet 172.16.110.0/24 static-mapping fooo+bar-baz mac-address '00:50:56:00:01:02'

Details

Difficulty level
Easy (less than an hour)
Version
1.3.0-epa3
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Stricter validation
Issue type
Bug (incorrect behavior)

Event Timeline

c-po triaged this task as Normal priority.
c-po created this task.
c-po changed Issue type from Unspecified (please specify) to Bug (incorrect behavior).
c-po renamed this task from DHCP server commit fails if static-mapping contains + to DHCP server commit fails if static-mapping contains + or ..Nov 10 2021, 6:26 PM
c-po changed Why the issue appeared? from Will be filled on close to Implementation mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Stricter validation.