diff options
| author | Roy Marples <roy@marples.name> | 2008-05-12 21:03:38 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-05-12 21:03:38 +0000 |
| commit | 1b3bc4775a960dbf65ffe3f540d63d122311f9c4 (patch) | |
| tree | faca65a7be95961762f4bce6cb02cfabbced9693 /dhcpcd.c | |
| parent | da635e38f73a70ea8e1fc51bdd673a78fe34a7b9 (diff) | |
| download | dhcpcd-1b3bc4775a960dbf65ffe3f540d63d122311f9c4.tar.xz | |
Don't encode the hostname as a FQDN by default as not all DHCP servers support this.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -650,11 +650,17 @@ main(int argc, char **argv) goto abort; } } - if (strchr(options->hostname, '.')) { + + if ((p = strchr(options->hostname, '.'))) { if (options->fqdn == FQDN_DISABLE) - options->fqdn = FQDN_BOTH; - } else - options->fqdn = FQDN_DISABLE; + *p = '\0'; + } else { + if (options->fqdn != FQDN_DISABLE) { + logger(LOG_WARNING, "hostname `%s' is not a FQDN", + options->hostname); + options->fqdn = FQDN_DISABLE; + } + } if (options->request_address.s_addr == 0 && options->options & DHCPCD_INFORM) |
