diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-12-06 16:28:35 +0100 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-12-06 16:28:35 +0100 |
commit | 1481566529783ec10b142c39ed61a9ed8482a818 (patch) | |
tree | 1ba9d46732a8d5e2d61f227809b810112783230a /process.go | |
parent | d7334fd3d11f8e562c2520bdc4af4470294c0ee4 (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.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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}) |