Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Underscore sign in dns name field #3722

Closed
szutman opened this issue Dec 3, 2019 · 2 comments
Closed

Underscore sign in dns name field #3722

szutman opened this issue Dec 3, 2019 · 2 comments
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@szutman
Copy link

szutman commented Dec 3, 2019

Environment

  • Python version: 3.6.8
  • NetBox version: 2.6.6

Steps to Reproduce

  1. IPAM -> Add new IP Address
  2. In DNS Name field use underscore (-)

When I want to use underscore in dns name there is warning that only alphanumeric chracters, hyphens, and periods are allowed in DNS names

Expected Behavior

Is there any chances to allow underscore in DNS Name field ?

As we can read in wikipedia article about dns names

"While a hostname may not contain other characters, such as the underscore character (_), other DNS names may contain the underscore.[5][6] This restriction was lifted by RFC 2181, Section 11. Systems such as DomainKeys and service records use the underscore as a means to assure that their special character is not confused with hostnames. For example, _http._sctp.www.example.com specifies a service pointer for an SCTP-capable webserver host (www) in the domain example.com."
https://en.wikipedia.org/wiki/Hostname

Then I think that underscoure could be valid sign of dns name, am I right ?

PS. I can live with that because I figured it out how to allow underscore sign in my installation of Netbox (ipam -> validators.py) but I'am affraid of future upgrade Netbox, because after done migrations there is a small change in db scheme - is this something that I have to worry about that ?

PS2. I love Netbox at first sight ;)

Cheers,
Szutman

@DanSheps DanSheps added status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application labels Dec 4, 2019
@DanSheps
Copy link
Member

DanSheps commented Dec 4, 2019

If we are going strictly by hostnames, then underscore would not be allowed, however since the DNS name is tied to an IP, I don't think strictly going by the hostname specification is required.

@kobayashi
Copy link
Contributor

I agree with Dan's comment.

@szutman can you volunteer to take on this if you are interested? DNS validation is implemented here.

@jeremystretch jeremystretch reopened this Dec 9, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

4 participants