diff options
author | Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> | 2014-01-14 14:15:32 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-02-01 00:03:28 +0100 |
commit | 56feae39a4d3c356c13d6826f34f83e0471f6e07 (patch) | |
tree | 8470da784b5ffd649ddb4c1fa0a20b6307441c99 /src | |
parent | 113debb7297f0c02b5be0dd404badeef78841a83 (diff) | |
download | sssd-56feae39a4d3c356c13d6826f34f83e0471f6e07.tar.gz sssd-56feae39a4d3c356c13d6826f34f83e0471f6e07.tar.xz sssd-56feae39a4d3c356c13d6826f34f83e0471f6e07.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/providers/dp_dyndns.c | 9 |
1 files changed, 6 insertions, 3 deletions
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 * |