From 56feae39a4d3c356c13d6826f34f83e0471f6e07 Mon Sep 17 00:00:00 2001 From: Nikolai Kondrashov Date: Tue, 14 Jan 2014 14:15:32 +0200 Subject: dyndns: Update PTR records separately Generate nsupdate input for sending PTR record update messages separately instead of together in nsupdate_msg_add_ptr. This fixes updates with addresses from different networks (DNS zones), as nsupdate doesn't support such updates in a single message. Fixes https://fedorahosted.org/sssd/ticket/2179 --- src/providers/dp_dyndns.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/providers/dp_dyndns.c b/src/providers/dp_dyndns.c index 77a128f3c..fb789ee18 100644 --- a/src/providers/dp_dyndns.c +++ b/src/providers/dp_dyndns.c @@ -332,7 +332,9 @@ nsupdate_msg_add_ptr(char *update_msg, struct sss_iface_addr *addresses, /* example: update delete 38.78.16.10.in-addr.arpa. in PTR */ update_msg = talloc_asprintf_append(update_msg, - "update delete %s in PTR\n", strptr); + "update delete %s in PTR\n" + "send\n", + strptr); talloc_free(strptr); if (update_msg == NULL) { return NULL; @@ -361,7 +363,8 @@ nsupdate_msg_add_ptr(char *update_msg, struct sss_iface_addr *addresses, /* example: update delete 38.78.16.10.in-addr.arpa. in PTR */ update_msg = talloc_asprintf_append(update_msg, - "update add %s %d in PTR %s.\n", + "update add %s %d in PTR %s.\n" + "send\n", strptr, ttl, hostname); talloc_free(strptr); if (update_msg == NULL) { @@ -369,7 +372,7 @@ nsupdate_msg_add_ptr(char *update_msg, struct sss_iface_addr *addresses, } } - return talloc_asprintf_append(update_msg, "send\n"); + return update_msg; } static char * -- cgit