diff options
| author | Roy Marples <roy@marples.name> | 2009-01-29 11:21:16 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2009-01-29 11:21:16 +0000 |
| commit | ed913a59775402a9ce66067858d7280fe4506176 (patch) | |
| tree | 622bc27dd349878a48255b2102e881cedda64401 /dhcp.c | |
| parent | f2151f9eafc673071c14667f0f334c3288f74a65 (diff) | |
| download | dhcpcd-ed913a59775402a9ce66067858d7280fe4506176.tar.xz | |
dhcpcd should not send hostname by default.
However, the default config file we ship enables the sending of the hostname
by default.
This makes things more explicit I think, and also allows the FQDN to be sent
but not the hostname if someone ever needs this.
Diffstat (limited to 'dhcp.c')
| -rw-r--r-- | dhcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -892,7 +892,7 @@ make_message(struct dhcp_message **message, * upto the first dot (the short hostname) as otherwise * confuses some DHCP servers when updating DNS. * The FQDN option should be used if a FQDN is required. */ - if (ifo->hostname[0]) { + if (ifo->options & DHCPCD_HOSTNAME && ifo->hostname[0]) { *p++ = DHO_HOSTNAME; hp = strchr(ifo->hostname, '.'); if (hp) @@ -903,7 +903,7 @@ make_message(struct dhcp_message **message, memcpy(p, ifo->hostname, len); p += len; } - if (ifo->fqdn != FQDN_DISABLE) { + if (ifo->fqdn != FQDN_DISABLE && ifo->hostname[0]) { /* IETF DHC-FQDN option (81), RFC4702 */ *p++ = DHO_FQDN; lp = p; |
