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

Issues with DHCP entries containing hostnames with invalid characters #1

Open
jpluimers opened this issue May 12, 2016 · 6 comments
Open

Comments

@jpluimers
Copy link

jpluimers commented May 12, 2016

Hostnames should only include a limited set of characters: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names

I've two types of devices that fail here:

  • Harman Kardon devices (BDS580_AP 02e466)
  • Buffalo networking (AP4CE6760F5042) - seems legit, but has a terminating null character

They are added with invalid hostnames into the DNS.

In due time you will get a pull request that solves this and will also remove those added invalid hostnames.

It is going to take a while as the Mikrotik RouterOS Scripting language has very limited documentation, has some issues with associative arrays and the :pick function, and in general has a steep learning curve.

--jeroen

@Tolaris
Copy link
Owner

Tolaris commented May 13, 2016

Awesome, I look forward to your pull request! I'm familiar with the problem
of devices violating the DNS spec, and with how much Mikrotik scripting
sucks. I don't use this script personally anymore, but if you've tested it
I'm happy to take a fix.

On 12 May 2016 at 18:46, Jeroen Wiert Pluimers notifications@github.com
wrote:

Hostnames should only include a limited set of characters:
https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names

I've two types of devices that fail here:

  • Harman Kardon devices (BDS580_AP 02e466)
  • Buffalo networking (AP4CE6760F5042) - seems legit, but has a
    terminating null character

They are added with invalid hostnames into the DNS.

In due time you will get a pull request that solves this and also remove
those added invalid hostnames.

It is going to take a while as the Mikrotik RouterOS Scripting language
has very limited documentation, has some issues with associative arrays and
the :pick function, and in general has a steep learning curve.

--jeroen


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1

@jpluimers
Copy link
Author

jpluimers commented May 15, 2016

Hi Tyler,

Thanks.

So you still use Mikrotik devices?

I ask because I want to put up a collection of RouterOS scripts online
(probably github or bitbucket) and looking for people that have reasonable
input to start with.

I've recently asked a few script related questions on the mikrotik forums
and the state-of-the-art isn't really what I was hoping for (:

Regards,

--jeroen

@Tolaris
Copy link
Owner

Tolaris commented May 16, 2016

That's a kind offer, thanks! Email me at tyler@tolaris.com (tyler tolaris
com, does github try to obfuscate emails? About to find out.) to contact me
directly any time. Ping me if you come to London!

I do use two Mikrotik routers for some colocated servers I own, which means
I don't need dynamic DNS/DHCP integration anymore and rarely script
anything. But I'm happy to share what I have.

On 15 May 2016 at 16:04, Jeroen Wiert Pluimers notifications@github.com
wrote:

Hi Tyler,

Thanks.

So you still use Mikrotik devices?

I ask because I want to put up a collection of RouterOS scripts online
(probably github or bitbucket) and looking for people that have reasonable
input to start with.

I've recently asked a few script related questions on the mikrotik forums
and the state-of-the-art isn't really what I was hoping for (:

BTW: If you ever are back in Amsterdam, let me know. We can probably
accommodate you for a few nights here.

Regards,

--jeroen

Groet,

Jeroen W. Pluimers - specialist in .NET, Win32, SQL, Visual Studio & Delphi
tel: +31 20 610 8322
fax: +31 20 610 8323
GSM: +31 654 385 135
mailto:jeroen@pluimers.com
Pluimers Software Ontwikkeling BV, Amsterdam, Trade-register 34152606
http://wiert.me ; http://jwpluimers.myplaxo.com/

On Fri, May 13, 2016 at 8:44 AM, Tyler J. Wagner <notifications@github.com

wrote:

Awesome, I look forward to your pull request! I'm familiar with the
problem
of devices violating the DNS spec, and with how much Mikrotik scripting
sucks. I don't use this script personally anymore, but if you've tested
it
I'm happy to take a fix.

On 12 May 2016 at 18:46, Jeroen Wiert Pluimers <notifications@github.com

wrote:

Hostnames should only include a limited set of characters:

https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names

I've two types of devices that fail here:

  • Harman Kardon devices (BDS580_AP 02e466)
  • Buffalo networking (AP4CE6760F5042) - seems legit, but has a
    terminating null character

They are added with invalid hostnames into the DNS.

In due time you will get a pull request that solves this and also
remove
those added invalid hostnames.

It is going to take a while as the Mikrotik RouterOS Scripting language
has very limited documentation, has some issues with associative arrays
and
the :pick function, and in general has a steep learning curve.

--jeroen


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
<
#1 (comment)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1 (comment)

@mmv-ru
Copy link

mmv-ru commented May 22, 2016

What is best to do with unacceptable symbols? Remove or replace by hex code?
Or some smart behavior, like remove NULL (and other control chars?) replace underscore to minus and others to hex.

@jpluimers
Copy link
Author

@jpluimers
Copy link
Author

@mmv-ru in the link a LOG output by the code I have so far.

I need to add a decision column to the log and then cleanup the code.

https://gist.github.com/jpluimers/5555abaf0d46357203638b674930abfe

Tolaris added a commit that referenced this issue Jan 5, 2018
fix Issue #1 and some other improvements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants