Skip to content

Commit

Permalink
enforce lan<wan
Browse files Browse the repository at this point in the history
  • Loading branch information
calmh committed Apr 16, 2023
1 parent 111d81a commit 9c6e102
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/config/optionsconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ func (opts *OptionsConfiguration) prepare(guiPWIsSet bool) {
if opts.ConnectionLimitMax < 0 {
opts.ConnectionLimitMax = 0
}

if opts.ConnectionPriorityQUICWAN <= opts.ConnectionPriorityQUICLAN {
l.Warnln("Connection priority number for QUIC over WAN must be worse (higher) than QUIC over LAN. Correcting.")
opts.ConnectionPriorityQUICWAN = opts.ConnectionPriorityQUICLAN + 1
}
if opts.ConnectionPriorityTCPWAN <= opts.ConnectionPriorityTCPLAN {
l.Warnln("Connection priority number for TCP over WAN must be worse (higher) than TCP over LAN. Correcting.")
opts.ConnectionPriorityTCPWAN = opts.ConnectionPriorityTCPLAN + 1
}
}

// RequiresRestartOnly returns a copy with only the attributes that require
Expand Down

0 comments on commit 9c6e102

Please sign in to comment.