Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1358427 - dhcp errors with hostnames beginning with numbers
Summary: dhcp errors with hostnames beginning with numbers
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dnsmasq
Version: 7.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Pavel Šimerda (pavlix)
QA Contact: Vaclav Danek
Depends On:
Blocks: 1371460
TreeView+ depends on / blocked
Reported: 2016-07-20 16:12 UTC by Casey Carson
Modified: 2016-11-04 06:14 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, dnsmasq incorrectly read host names using the "--dhcp-hostsfile" and "--dhcp-host" options that began with numbers. As a consequence, hosts with numbers at the beginning of the host name did not receive a lease, and dnsmasq logged the "no address available" error. With this update, dnsmasq reads host names correctly, and DHCP errors with host names that begin with numbers no longer occur.
Clone Of:
: 1371460 (view as bug list)
Last Closed: 2016-11-04 06:14:56 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2421 normal SHIPPED_LIVE dnsmasq bug fix update 2016-11-03 13:59:05 UTC

Description Casey Carson 2016-07-20 16:12:30 UTC
Description of problem:

dnsmasq contains a bug where hostnames that begin with numbers inside the dhcp-hostsfile are not honored and are logged as "bad DHCP host name at line X"

This has been fixed upstream to be in accordance with RFC 1123 (see

Version-Release number of selected component (if applicable):

Name        : dnsmasq
Version     : 2.66
Release     : 14.el7_1
Architecture: x86_64

How reproducible: Always

Steps to Reproduce:
1. Add a host entry in the dnsmasq dhcp-host file where the name begins with a number, e.g.


2. Start dnsmasq

Actual results:

Error is logged as "bad DHCP host name at line"
host with associated mac address cannot receive a lease, dnsmasq logs error "no address available"

Expected results:

File is read without errors, dhcp requests succeed

Additional info:

Comment 2 Casey Carson 2016-07-27 15:15:42 UTC
The OpenStack folks might be interested in this as I ran into this bug when testing out the neutron ml2 dns extension driver.  

When using the dns extension driver, neutron uses the <instancename>.suffix in the dnsmasq host file as opposed to 'host-<IP>.suffix'

If the instance begins with a number, the aforementioned problem occurs and the instance is unable to get its dhcp lease from dnsmasq

Comment 5 Pavel Šimerda (pavlix) 2016-08-26 14:32:49 UTC
A simple test to check whether your version is affected:

dnsmasq-2.66/src/dnsmasq --test --dhcp-host=02:22:22:22:22:22,,0myhostname

Note: It doesn't test the actual functionality, that would need a configured interface and other options and `--test` would be removed.

Comment 16 errata-xmlrpc 2016-11-04 06:14:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

Note You need to log in before you can comment on or make changes to this bug.