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

Added conflict handling for hostname. #39

Merged
merged 6 commits into from
Jun 15, 2020
Merged

Conversation

P-Fleer
Copy link
Contributor

@P-Fleer P-Fleer commented May 24, 2020

If the host name already exists on the local network, a suffix is appended to the name.

@troglobit
Copy link
Owner

This looks in general really good! What do you think about adding three last octets of MAC address instead to hostname in conflict resolution?

I dunno if that's even included, but you've got it in your L1 cache right now and that's what we do at $DAYJOB currently with the Apple mDNSResponder.

@P-Fleer
Copy link
Contributor Author

P-Fleer commented Jun 1, 2020 via email

@troglobit
Copy link
Owner

Aha, that was interesting, did not know that about Avahi. Thanks!

We have a similar problem at Westermo, we have up to 32 MAC addresses per device. One per physical port. For a collection of ports (VLAN) one MAC us selected for that layer-3 interface which is used for management. This is what is announced by mDNS/SD: services reachable on that interface.

An index is OK, but hard to identify using the production label (serial no + base MAC) on the outside when opening a cabinet. The last three octets though: weos-34-56-78.local and weos-9a-bb-a0 are a lot easier to spot when you know the OUI.

Don't get me wrong, I like your patch. Just looking for a way to make it configurable. (And at the same time fit my use-case of course :-)

@P-Fleer
Copy link
Contributor Author

P-Fleer commented Jun 3, 2020 via email

@troglobit
Copy link
Owner

I understand completely! :)

I've just been dragging my feet merging this PR, sorry. Simply wanted to check myself if it's possible to add my/our own use-case. Let's put it like this; I'll add a TODO to support using MAC suffix for conflict resulution in the future, if so you may have to set this up in the configuration somehow to get your behavior. Is that OK?

@troglobit troglobit merged commit 98fd3a2 into troglobit:master Jun 15, 2020
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

Successfully merging this pull request may close these issues.

2 participants