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

dhcp: some servers need a short client identifier #3509

Closed
wants to merge 1 commit into from

Conversation

odinho
Copy link

@odinho odinho commented Jun 11, 2016

The cheap Comfast CF-WR150N (and probably other routers with the same
broken firmware) won't give you an IP unless the client identifier is
less than 8 bytes.

So truncate to 7 bytes when we generate the dhcid ourself so that the
automatic way works on all kind of networks.

Info

I originally created this bug for NetworkManager, but you are technically the upstream for the code and you will have the same problem.

There are also more people on Arch Linux who got the same problem when Arch suddenly changed from using dhclient to the internal (systemd-based) DHCP client in NetworkManager.

I don't really expect you to take this PR, as it seems wrong to truncate in this way. But consider this a bug report, with a suggested patch. :)

The cheap Comfast CF-WR150N (and probably other routers with the same
broken firmware) won't give you an IP unless the client identifier is
less than 8 bytes.

So truncate to 7 bytes when we generate the dhcid ourself so that the
automatic way works on all kind of networks.
@keszybz
Copy link
Member

keszybz commented Jun 12, 2016

Yeah, I don't think we want to truncate the uid like this. In particular because this length includes two bytes for the type, which means only 5 bytes left, which is not enough for a unique identifier (birthday paradox and all that).

You can work around the issue by specifying DUIDRawData= yourself to some 5 byte value. It would be great if you could test that this actually works as expected with your router.

@teg, @vinaykul, thoughts?

@vinaykul
Copy link
Contributor

@velmont This is not a reasonable fix, it will break everything else.

As @keszybz suggested, if you only care about the length being max 7 bytes, you should try setting ClientIdentifier=duid and set a small DUIDRawData (probably 3) so that the length of Client_Id (DUID+IAID) adds up to 7.

@zonque zonque added the ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR label Jun 14, 2016
@martinpitt
Copy link
Contributor

This PR is several months old and stale, and got rejected in its present form. Hence I am closing it now. If this is still relevant, please fix and rebase to current master, and either reopen this PR or open a new one. Thank you for understanding!

@martinpitt martinpitt closed this Oct 12, 2016
@odinho
Copy link
Author

odinho commented Oct 12, 2016

Well, it was meant as a bug report, not really a PR (as said in the text).

I guess I can just add a bug report instead? Even though I stopped using this router, the incompatibility of systemd dhcp and these Chinese routers probably continue to exist.

On the other hand, maybe it makes more sense for someone who can debug the problem to come along and open a new bug report when they do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR dhcp network
Development

Successfully merging this pull request may close these issues.

None yet

6 participants