[0.17.79] RCON message IDs won't go over 255

Bugs that are actually features.
Nicksaurus
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Thu Aug 28, 2014 12:56 pm
Contact:

[0.17.79] RCON message IDs won't go over 255

Post by Nicksaurus »

If you send an RCON message to a factorio server with a message ID higher than 255, the ID you get in the response will be [your ID] % 256. Here's some example output from my program:
RCON error.png
RCON error.png (29.17 KiB) Viewed 1568 times
You can see at the bottom that I'm sending a message with an ID of 256 and receiving a response with an ID of 0.

The RCON specification (https://developer.valvesoftware.com/wik ... #Packet_ID) states that the ID can be 'any positive integer', so I would expect it to be able to go higher
Attachments
factorio-current.log
(9.56 KiB) Downloaded 83 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14247
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.79] RCON message IDs won't go over 255

Post by Rseding91 »

Thanks for the report. It should be fixed for the next release. It looks like the message ID was getting swapped with the client ID which just happens to be an ever-incrementing number and some how that worked this entire time (???) I guess everyones message IDs were also ever-incrementing numbers. Or something.
If you want to get ahold of me I'm almost always on Discord.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14247
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.79] RCON message IDs won't go over 255

Post by Rseding91 »

Actually ignore what I said. It seems everything was correct and the issue is most likely on your end. I've had 2 other people test and they can encode and send message IDs over 255 without issue so what ever is going wrong is on your end with how you're encoding or decoding them.
If you want to get ahold of me I'm almost always on Discord.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2964
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.79] RCON message IDs won't go over 255

Post by boskid »

79956.png
79956.png (30.38 KiB) Viewed 1547 times
Nicksaurus
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Thu Aug 28, 2014 12:56 pm
Contact:

Re: [0.17.79] RCON message IDs won't go over 255

Post by Nicksaurus »

Rseding91 wrote: Sat Jan 11, 2020 8:51 pm Actually ignore what I said. It seems everything was correct and the issue is most likely on your end. I've had 2 other people test and they can encode and send message IDs over 255 without issue so what ever is going wrong is on your end with how you're encoding or decoding them.
Ah, you're right. It turns out I was truncating the ID in my requests. Sorry for wasting your time.
Post Reply

Return to “Not a bug”