Add support for <option> tag in network config

This patch adds support for a new <option>-Tag in the <dhcp> block of
network configs, based on a subset of the fifth proposal by Laine
Stump in the mailing list discussion at
https://www.redhat.com/archives/libvir-list/2012-November/msg01054.html.
Any such defined option will result in a dhcp-option=<number>,"<value>"
statement in the generated dnsmasq configuration file.

Currently, DHCP options can be specified by number only and there is
no whitelisting or blacklisting of option numbers, which should
probably be added.

Signed-off-by: Pieter Hollants <pieter@hollants.com>
Signed-off-by: Laine Stump <laine@laine.org>
This commit is contained in:
Pieter Hollants
2013-02-21 23:40:17 +01:00
committed by Laine Stump
parent 2795813c69
commit 383ebc4694
10 changed files with 96 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
<dhcp>
<range start="192.168.122.2" end="192.168.122.254" />
<bootp file="pxeboot.img" />
<option number="252" value="\n"/>
</dhcp>
</ip>
</network>

View File

@@ -8,6 +8,7 @@
<dhcp>
<range start="192.168.122.2" end="192.168.122.254" />
<bootp file="pxeboot.img" server="10.20.30.40" />
<option number="252" value="\n"/>
</dhcp>
</ip>
</network>