diff --git a/provider/rfc2136/rfc2136.go b/provider/rfc2136/rfc2136.go index 50ee6e7b5..21fab5f88 100644 --- a/provider/rfc2136/rfc2136.go +++ b/provider/rfc2136/rfc2136.go @@ -176,6 +176,9 @@ OuterLoop: case dns.TypeTXT: rrValues = (rr.(*dns.TXT).Txt) rrType = "TXT" + case dns.TypeNS: + rrValues = []string{rr.(*dns.NS).Ns} + rrType = "NS" default: continue // Unhandled record type } diff --git a/provider/rfc2136/rfc2136_test.go b/provider/rfc2136/rfc2136_test.go index 89e3b9012..bc8a7106f 100644 --- a/provider/rfc2136/rfc2136_test.go +++ b/provider/rfc2136/rfc2136_test.go @@ -172,6 +172,11 @@ func TestRfc2136ApplyChanges(t *testing.T) { RecordType: "TXT", Targets: []string{"boom"}, }, + { + DNSName: "ns.foobar.com", + RecordType: "NS", + Targets: []string{"boom"}, + }, }, Delete: []*endpoint.Endpoint{ { @@ -190,13 +195,16 @@ func TestRfc2136ApplyChanges(t *testing.T) { err = provider.ApplyChanges(context.Background(), p) assert.NoError(t, err) - assert.Equal(t, 2, len(stub.createMsgs)) + assert.Equal(t, 3, len(stub.createMsgs)) assert.True(t, strings.Contains(stub.createMsgs[0].String(), "v1.foo.com")) assert.True(t, strings.Contains(stub.createMsgs[0].String(), "1.2.3.4")) assert.True(t, strings.Contains(stub.createMsgs[1].String(), "v1.foobar.com")) assert.True(t, strings.Contains(stub.createMsgs[1].String(), "boom")) + assert.True(t, strings.Contains(stub.createMsgs[2].String(), "ns.foobar.com")) + assert.True(t, strings.Contains(stub.createMsgs[2].String(), "boom")) + assert.Equal(t, 2, len(stub.updateMsgs)) assert.True(t, strings.Contains(stub.updateMsgs[0].String(), "v2.foo.com")) assert.True(t, strings.Contains(stub.updateMsgs[1].String(), "v2.foobar.com"))