s4-dns: set dwSerial and dwFlags
authorAndrew Tridgell <tridge@samba.org>
Tue, 21 Dec 2010 09:53:58 +0000 (20:53 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 21 Dec 2010 11:05:51 +0000 (12:05 +0100)
we are waiting on full docs on these, but this is better than zero

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Dec 21 12:05:51 CET 2010 on sn-devel-104

source4/dns_server/dlz_bind9.c

index 1b522632aa995ed4d1212462a465091c00c5713f..83790c8da0359d24160833c25e659ecde278e133 100644 (file)
@@ -38,6 +38,7 @@ struct dlz_bind9_data {
        struct tevent_context *ev_ctx;
        struct loadparm_context *lp;
        int *transaction_token;
+       uint32_t soa_serial;
 
        /* helper functions from the dlz_dlopen driver */
        void (*log)(int level, const char *fmt, ...);
@@ -162,6 +163,8 @@ static bool b9_format(struct dlz_bind9_data *state,
                        return false;
                }
 
+               state->soa_serial = rec->data.soa.serial;
+
                *data = talloc_asprintf(mem_ctx, "%s %s %u %u %u %u %u",
                                        mname,
                                        rec->data.soa.rname,
@@ -1187,6 +1190,10 @@ _PUBLIC_ isc_result_t dlz_addrdataset(const char *name, const char *rdatastr, vo
                return ISC_R_NOMEMORY;
        }
 
+       /* we're waiting on docs for this field */
+       rec->dwFlags = 0x0000f005;
+       rec->dwSerial = state->soa_serial;
+
        if (!b9_parse(state, rdatastr, rec)) {
                state->log(ISC_LOG_INFO, "samba_dlz: failed to parse rdataset '%s'", rdatastr);
                talloc_free(rec);