Page MenuHomeVyOS Platform

dhcp: Invalid domain name "private"
Closed, ResolvedPublicBUG

Description

vyos@vyos# set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 domain-name private
  Invalid domain name (RFC 1123 section 2).
  May only contain letters, numbers and .-_
  Value validation failed
  Set failed

The line is validated by https://github.com/vyos/vyos-1x/blob/ede8217b6345b58da85f68ca024b54e04fd6348c/src/validators/fqdn

We probably should adjust that regex to the same one we use on system domain-name which is [A-Za-z0-9][-.A-Za-z0-9]*

Details

Version
1.3.0-rc1
Is it a breaking change?
Stricter validation
Issue type
Bug (incorrect behavior)

Event Timeline

I agree we should just check if it starts with a letter and doesn't include characters that an FQDN cannot have.

OR we should write a rigorous RFC-compliant validator, but for now we need to stop valid domains from failing, so I'm all for that regex change.

c-po changed the task status from Open to In progress.Feb 28 2021, 8:57 AM
c-po claimed this task.
c-po added a project: VyOS 1.4 Sagitta.
c-po edited a custom field.
c-po edited a custom field.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Stricter validation.
c-po moved this task from Open to In Progress on the VyOS 1.4 Sagitta board.
c-po moved this task from Need Triage to In Progress on the VyOS 1.3 Equuleus board.

Temporary workaround for the VyOS 1.3-rc1 users:

Remove the syntax:expression line from /opt/vyatta/share/vyatta-cfg/templates/service/dhcp-server/shared-network-name/node.tag/subnet/node.tag/domain-name/node.def

c-po triaged this task as Urgent! priority.
SrividyaA set Issue type to Bug (incorrect behavior).Aug 31 2021, 1:53 PM