Skip to content

Commit bc816ed

Browse files
author
dougbw
committed
fix SOA record
1 parent b95279a commit bc816ed

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

omada.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ func (o *Omada) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
5252
switch qtype {
5353
case 1: // A
5454
qzone = qname
55+
case 6: // SOA
56+
qzone = qname
5557
case 12: // PTR
5658
qzone = ptrZone
5759
default:

soa.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import (
88
func addSoaRecord(zone *file.Zone, domain string) {
99

1010
soa := &dns.SOA{Hdr: dns.RR_Header{Name: domain, Rrtype: dns.TypeSOA, Class: dns.ClassINET, Ttl: 300},
11-
Minttl: uint32(3600),
12-
Expire: uint32(3600),
11+
Minttl: uint32(300),
12+
Expire: uint32(86400),
1313
Retry: uint32(3600),
14-
Refresh: uint32(3600),
15-
Serial: uint32(3600),
16-
Mbox: dns.Fqdn(domain),
17-
Ns: "127.0.0.1"}
14+
Refresh: uint32(7200),
15+
Serial: uint32(1),
16+
Mbox: dns.Fqdn("hostmaster." + domain),
17+
Ns: dns.Fqdn("ns." + domain)}
1818
zone.Insert(soa)
1919

2020
}

0 commit comments

Comments
 (0)