[libvirt] [PATCH] dnsmasq: allowing RFC 2782 compliant srv records

Hello, I want to provide a patch which allows RFC 2782 compliant dns srv records in the network configs. If you have questions, please contact me. Kind Regards, Steven Malin --- src/conf/network_conf.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index bac0465..9a4285b 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -961,9 +961,11 @@ virNetworkDNSSrvDefParseXML(const char *networkName, goto error; } - /* Check whether protocol value is the supported one */ + /* Check whether protocol value is supported (also RFC 2782 compliant) */ if (def->protocol && STRNEQ(def->protocol, "tcp") && - (STRNEQ(def->protocol, "udp"))) { + STRNEQ(def->protocol, "udp") && + STRNEQ(def->protocol, "_tcp") && + STRNEQ(def->protocol, "_udp")) { virReportError(VIR_ERR_XML_DETAIL, _("Invalid protocol attribute value '%s' " "in DNS SRV record of network %s"), -- 1.7.1

On Mon, Mar 03, 2014 at 10:18:30AM +0100, Steven Malin wrote:
Hello,
I want to provide a patch which allows RFC 2782 compliant dns srv records in the network configs. If you have questions, please contact me.
Kind Regards, Steven Malin
Please change the commit message in order for it to look more like others in libvirt. No need to use formalities in this part of patch ;-)
---
Lines you'd like to include in the patch even when they shouldn't be part of history can appear here (those won't be part of the commit then).
src/conf/network_conf.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index bac0465..9a4285b 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -961,9 +961,11 @@ virNetworkDNSSrvDefParseXML(const char *networkName, goto error; }
- /* Check whether protocol value is the supported one */ + /* Check whether protocol value is supported (also RFC 2782 compliant) */
Your mail client wraps long lines even in patches, I'd suggest using 'git send-email' instead.
if (def->protocol && STRNEQ(def->protocol, "tcp") && - (STRNEQ(def->protocol, "udp"))) { + STRNEQ(def->protocol, "udp") && + STRNEQ(def->protocol, "_tcp") && + STRNEQ(def->protocol, "_udp")) {
This should be documented in 'docs/formatnetwork.html.in'. Is dnsmasq so simple it allows anything as input and doesn't properly transform 'http.tcp.example.com' into '_http._tcp.example.com'? I guess it doesn't (even though we add the info only when both service and protocol are specified). Can you make those changes and send a v2? Thanks, Martin
virReportError(VIR_ERR_XML_DETAIL, _("Invalid protocol attribute value '%s' " "in DNS SRV record of network %s"), -- 1.7.1
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
participants (2)
-
Martin Kletzander
-
Steven Malin