Skip to content

Commit 1ec9102

Browse files
committed
increase udpme receive buf when needed
1 parent b5fd794 commit 1ec9102

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

upstream.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ func (u *upstream) exchangeOPTM(m *dns.Msg) (*dns.Msg, error) {
4343
}
4444
defer c.Close()
4545
c.SetDeadline(time.Now().Add(time.Second * 3))
46+
if opt := m.IsEdns0(); opt != nil {
47+
c.UDPSize = opt.UDPSize()
48+
}
4649
if err := c.WriteMsg(m); err != nil {
4750
return nil, err
4851
}

0 commit comments

Comments
 (0)