aboutsummaryrefslogtreecommitdiff
path: root/process.go
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-12-06 16:28:35 +0100
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-12-06 16:28:35 +0100
commit1481566529783ec10b142c39ed61a9ed8482a818 (patch)
tree1ba9d46732a8d5e2d61f227809b810112783230a /process.go
parentd7334fd3d11f8e562c2520bdc4af4470294c0ee4 (diff)
reject clients whose MaxProtoVer exceeds ours
The protocol version is not backwards-compatible because the client still transmits using the latest packet formats. Therefore we must kick any clients that support a later version than we do. Otherwise content will be broken.
Diffstat (limited to 'process.go')
-rw-r--r--process.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/process.go b/process.go
index fbbb6af..cddc766 100644
--- a/process.go
+++ b/process.go
@@ -46,7 +46,7 @@ func (cc *ClientConn) process(pkt mt.Pkt) {
return
}
- if cmd.MaxProtoVer < protoVer || cmd.MinProtoVer > protoVer {
+ if cmd.MaxProtoVer != protoVer || cmd.MinProtoVer > protoVer {
cc.Log("<-", "unsupported protoVer range min", cmd.MinProtoVer, "max", cmd.MaxProtoVer, "expect", protoVer)
ack, _ := cc.SendCmd(&mt.ToCltKick{Reason: mt.UnsupportedVer})