I run a system dnsmasq to be able to forward specific DNS requests to
specific servers. And I have it configured for both forward and reverse
lookups. Another dnsmasq is started for a virtual network with domain
"virt". The system dnsmasq knows it needs to forward any requests for
the "virt" domain and corresponding PTR domain to the dnsmasq started by
libvirt. The problem is dnsmasq forwards queries for unknown names to
the upstream name server (which is the system instance in my case). One
can get nice endless loops of DNS requests pretty easily. Forward loops
can be avoided by specifying localOnly='yes', but there was no way to
avoid reverse lookup loops. And this is what I'm trying to address in
the following patches.
Version 2:
- RNG schema changes and tests
Jiri Denemark (5):
tests: Check more network XMLs for schema compliance
schema: Let elements in /network/ip be specified in any order
conf: Make virNetworkIPDefParseXML a little bit saner
util: Introduce virSocketAddrPTRDomain
network: Add support for local PTR domains
docs/formatnetwork.html.in | 37 ++++++--
docs/schemas/basictypes.rng | 6 ++
docs/schemas/network.rng | 92 ++++++++++++--------
src/conf/network_conf.c | 108 +++++++++++++++++++-----
src/conf/network_conf.h | 4 +
src/libvirt_private.syms | 1 +
src/network/bridge_driver.c | 47 +++++++++++
src/util/virsocketaddr.c | 85 +++++++++++++++++++
src/util/virsocketaddr.h | 9 ++
tests/networkxml2confdata/dhcp6-nat-network.xml | 2 +-
tests/networkxml2confdata/netboot-network.xml | 2 +-
tests/networkxml2confdata/ptr-domains-auto.conf | 20 +++++
tests/networkxml2confdata/ptr-domains-auto.xml | 21 +++++
tests/networkxml2confdata/ptr-domains.conf | 24 ++++++
tests/networkxml2confdata/ptr-domains.xml | 24 ++++++
tests/networkxml2conftest.c | 2 +
tests/virschematest.c | 2 +-
17 files changed, 418 insertions(+), 68 deletions(-)
create mode 100644 tests/networkxml2confdata/ptr-domains-auto.conf
create mode 100644 tests/networkxml2confdata/ptr-domains-auto.xml
create mode 100644 tests/networkxml2confdata/ptr-domains.conf
create mode 100644 tests/networkxml2confdata/ptr-domains.xml
--
2.11.0