Skip to content

Commit

Permalink
fix corrupted packets when udpMaxPayloadSize is not set (#1702) (#1711)
Browse files Browse the repository at this point in the history
this happened when udpMaxPayloadSize was not explicitly set in
configuration file.
  • Loading branch information
aler9 authored Apr 15, 2023
1 parent a649f91 commit d7eadeb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@ func (conf *Conf) CheckAndFillMissing() error {
return fmt.Errorf("'readBufferCount' must be a power of two")
}
if conf.UDPMaxPayloadSize == 0 {
conf.UDPMaxPayloadSize = 1500
conf.UDPMaxPayloadSize = 1472
}
if conf.UDPMaxPayloadSize > 1500 {
return fmt.Errorf("'udpMaxPayloadSize' must be less than 1500")
if conf.UDPMaxPayloadSize > 1472 {
return fmt.Errorf("'udpMaxPayloadSize' must be less than 1472")
}
if conf.ExternalAuthenticationURL != "" {
if !strings.HasPrefix(conf.ExternalAuthenticationURL, "http://") &&
Expand Down

0 comments on commit d7eadeb

Please sign in to comment.