Skip to content

Commit 57d0932

Browse files
sgreene570openshift-cherrypick-robot
authored andcommitted
Corefile: Set bufsize to 512 bytes for all servers
The CoreDNS bufsize plugin was enabled with a set size of 1232 bytes in order to ensure that DNS queries bound for an upstream resolver contain EDNS OPT Resource Records. This resolved Bug 1949361. Some DNS Clients, such as Go's built-in stub DNS resolver, are not capable of handling DNS UDP messages that are larger than 512 bytes (even if the proper EDNS flags are included in the message). See golang/go#13561 & golang/go#6464 accordingly. This commit configures the bufsize plugin with a reduced bufsize of 512 bytes for all servers to ensure compatibility with primitive DNS clients. pkg/operator/controller/controller_dns_configmap.go: Set bufsize to 512 bytes for all servers. pkg/operator/controller/controller_dns_configmap_test.go: Update unit test cases. This commit is in support of Bug 196616 and should not cause any regression from the changes merged as a part of Bug 1949361.
1 parent d6ba05f commit 57d0932

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/operator/controller/controller_dns_configmap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ var corefileTemplate = template.Must(template.New("Corefile").Parse(`{{range .Se
2828
forward .{{range .Upstreams}} {{.}}{{end}}
2929
{{- end}}
3030
errors
31-
bufsize 1232
31+
bufsize 512
3232
}
3333
{{end -}}
3434
.:5353 {
35-
bufsize 1232
35+
bufsize 512
3636
errors
3737
health {
3838
lameduck 20s

pkg/operator/controller/controller_dns_configmap_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ func TestDesiredDNSConfigmap(t *testing.T) {
3737
foo.com:5353 {
3838
forward . 1.1.1.1 2.2.2.2:5353
3939
errors
40-
bufsize 1232
40+
bufsize 512
4141
}
4242
# bar
4343
bar.com:5353 example.com:5353 {
4444
forward . 3.3.3.3
4545
errors
46-
bufsize 1232
46+
bufsize 512
4747
}
4848
.:5353 {
49-
bufsize 1232
49+
bufsize 512
5050
errors
5151
health {
5252
lameduck 20s

0 commit comments

Comments
 (0)