dhcp: some servers need a short client identifier #3509
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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. :)