]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Dnsmasq config files syntax issue when dhcp_domain is empty
authorBertrand Lallau <bertrand.lallau@thalesgroup.com>
Wed, 11 Jun 2014 13:46:58 +0000 (15:46 +0200)
committerBertrand Lallau <bertrand.lallau@thalesgroup.com>
Tue, 15 Jul 2014 12:44:21 +0000 (14:44 +0200)
commit8fb69a4633e87446eadd7f0173a0168f78604cbe
treebffdb4d2765e2a9c269aacb6a6e1cd31213a531a
parent2d4b75b420f39f9572034b914c34be80a4c74eb1
Dnsmasq config files syntax issue when dhcp_domain is empty

When using dhcp-agent with the following property dhcp_domain=""
addn_hosts and host files genererated for Dnsmasq have wrong syntax
concerning hostname parameter (dot char at the end).

As described in RFC-952 the hostname grammar is as follows:
<hname> ::= <name>*["."<name>]
<name>  ::= <let>[*[<let-or-digit-or-hyphen>]<let-or-digit>]
Hence it can't be conclude with a dot char.

Dnsmasq process is waiting for a hostname (2nd parameter) in the
following files:
"addn_hosts" file contains:
   20.0.0.3 host-20-0-0-3. host-20-0-0-3
"host" file contains:
   fa:16:3e:bf:e1:e4,host-20-0-0-3.,20.0.0.3

With the patch you will get:
"addn_hosts":
   20.0.0.3 host-20-0-0-3 host-20-0-0-3
"host":
   fa:16:3e:bf:e1:e4,host-20-0-0-3,20.0.0.3

Change-Id: I4c10169019becaed6b2968b74f03ef356244a057
Closes-Bug: #1326256
neutron/agent/linux/dhcp.py
neutron/tests/unit/test_linux_dhcp.py