aboutsummaryrefslogtreecommitdiff
path: root/notes
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2020-10-07 15:58:14 +0200
committerGravatar GitHub <noreply@github.com> 2020-10-07 15:58:14 +0200
commit04e532b257d3b1d2e46a44109bbc76544d2e4dde (patch)
treeee1a0db77d79f353e2e11f21637a8b0f30308f67 /notes
parent383cc2809b11ed504fde10fee6b28e000ac0268e (diff)
downloadcoredns-04e532b257d3b1d2e46a44109bbc76544d2e4dde.tar.gz
coredns-04e532b257d3b1d2e46a44109bbc76544d2e4dde.tar.zst
coredns-04e532b257d3b1d2e46a44109bbc76544d2e4dde.zip
core: fix crash with no plugins (#4184)
* core: fix crash with no plugins A Corefile that defines a zone without plugins crashes coredns with the stack trace below. Change this to return a refused. ~~~ corefile example.org { whoami log cache debug } example.net { } ~~~ Asking for anyhing in example.net does this. Add test that tests this. ~~~ panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xa5e6a4] goroutine 55 [running]: github.com/coredns/coredns/core/dnsserver.(*Server).ServeDNS(0xc000438f60, 0x2059420, 0xc0005a4030, 0x206c0e0, 0xc000522140, 0xc0005ae000) /home/miek/src/github.com/coredns/coredns/core/dnsserver/server.go:247 +0x884 github.com/coredns/coredns/core/dnsserver.(*Server).ServePacket.func1(0x206dd00, 0xc00009e180, 0xc0005ae000) /home/miek/src/github.com/coredns/coredns/core/dnsserver/server.go:126 +0xaf github.com/miekg/dns.HandlerFunc.ServeDNS(0xc000529270, 0x206dd00, 0xc00009e180, 0xc0005ae000) /home/miek/go/pkg/mod/github.com/miekg/dns@v1.1.31/server.go:37 +0x44 github.com/miekg/dns.(*Server).serveDNS(0xc000286c60, 0xc000282400, 0x34, 0x200, 0xc00009e180) /home/miek/go/pkg/mod/github.com/miekg/dns@v1.1.31/server.go:609 +0x2f7 github.com/miekg/dns.(*Server).serveUDPPacket(0xc000286c60, 0xc0003b03b4, 0xc000282400, 0x34, 0x200, 0xc00000e320, 0xc000522080) /home/miek/go/pkg/mod/github.com/miekg/dns@v1.1.31/server.go:549 +0xb2 created by github.com/miekg/dns.(*Server).serveUDP /home/miek/go/pkg/mod/github.com/miekg/dns@v1.1.31/server.go:479 +0x292 ~~~ Also fix single typo in chaos_test.go Signed-off-by: Miek Gieben <miek@miek.nl> * Fix naming Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'notes')
0 files changed, 0 insertions, 0 deletions