Re: PATCH/Feature request



On Mon, 2012-01-23 at 10:18 +0100, Oncaphillis wrote:
> Hi,
> 
> Please find attached a patch against the current git
> which re-enables DHCP/DNS Name transmission including
> domain suffix as an option.
> 
> I have a rather dim DSL router with DHCP function
> which doesn't accept any domain specific options
> but allows for the transmission of a full hostname
> via the "send host-name" command. I use the domain name
> to distinguish between my VPN connection and the rest
> of the world. So I used to add the full hostname
> for NetworkManager. Now it chops off the
> domain suffix before transmission.
> 
>   The attached patch adds a property "dhcp-with-domain"
> to NetworkManager  which disables this behaviour when true.
> 
>   In addition the ifcfg-rh plugin enables this feature
> if it finds the DHCP_WITH_DOMAIN=yes line in the corresponding
> ifcfg-xxx file.

Just to clarify, you used to set your persistent system hostname to say
"mycomputer.foobar.org" and NM used to send that entire hostname to the
router, correct?  I know we changed it a while ago to only send the
hostname excluding the domain portion.  However, I think we should only
strip the hostname when we're using the system hostname.  If the user
manually specifies a name in dhclient-<xxx>.conf or in the connection
settings, then I think we should send exactly what the user entered.
That needs a bit of work though; we need to adjust the NMDhcpClient
class to take two hostnames to the client_start() function, one for the
system hostname and one for the hostname from the
NMSettingIP4Config/NMSettingIP6Config.  Then internally
nm-dhcp-dhclient.c would know whether to strip the system hostname (if
the hostname from settings is missing) or to use the configured hostname
verbatim.  The original bug for stripping the hostname is rh#694758.

Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]