-
Notifications
You must be signed in to change notification settings - Fork 84
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 Proxy Does Not Report Option 12 (Hostname) #676
Comments
It should not be that complicated, however as of of today netavark does not know the host name of a container so the first step would be to send the Hostname from podman to netavark. Change the type here in netavark to read the new field. Then add it to the grpc type so you can send it to the dhcp-proxy and then you need to figure out how to set this field in for the dhcp call. I checked at it seems the our DHCP library seems to support the Hostname option so it should be possible. That said I definitely wouldn't call this easy which of course depends on your expertise. The proxy code is definitely not very "clean", so figuring out how it works is not as trivial as it should be. |
Waiting for this too! |
Hi @Luap99, I have an implementation on my dev branch. Should I make a PR? But I'm changing the proto, and maybe this feature should only be enabled if explicitly asked. Please suggest some idea. |
I don't think you need to change the proto at all, there is already a host_name field which should be used. What is missing right now is that podman does not send us the real container hostname so we would need to fix this first. I have no problem sending the hostname to the dhcp server by default, a hostname is not a secret. |
@Luap99 Yes, missing container hostname is the problem. Actually the protobuf is changed to provide the container name, as a backup solution if hostname is missing. Another problem is, DHCP server can actually send a hostname to client. What's worse(better?) is that popular implementations including systemd-networkd and dhcpcd will accept it. But I didn't find related structure about how (and when) to set hostname from |
@Luap99 and @SilverBut Any updates on this? |
No, this is waiting for someone to propose a PR. I don't have time for it. |
Seems my dev branch have not updated for a while. Let me see what I can do. |
Using the container name as the ... as well as the fact that multiple containers in a podman network can DNS resolve each other via their container names by default |
Currently, the DHCP proxy does not report option 12 (client hostname) to the DHCP server when requesting a DHCP lease. This means that routers which function also as a DNS server (most consumer routers), and use that information in order to create an A record pointing to the DHCP client, will not function.
This issue does not affect the core DHCP proxy functionality, but instead represents a quality-of-life issue.
I would be willing to submit a PR for this, but I'm not familiar with the codebase; could someone please point me in the direction of the necessary changes?
The text was updated successfully, but these errors were encountered: