Author Topic: Does RakNet detect a modified packet, when encryption is not enabled?  (Read 7923 times)

knox

  • Guest
In ReliabilityLayer, there is a "cheater" variable.

This variable is never set to true. (I did a text-search with <cheater> and there is no place where this variable is set to true).

AFAIK, UDP itself detects any modified packet and deletes it, without the packet ever reaching the application.
As far as the application goes, that packet is assumed to be dropped.

Is RakNet depending on UDP to handle malice packets?

if the "cheater" cariable is never set to true (when a packet was actually modified), then I'll never get a ID_MODIFIED_PACKET message from RakNet.

Is this normal, or is this a bug?

If we want some kind of test, then effectively, the application has to punch a checksum with every packet it sends and the receiver has to validate it.

Won't it be easier if RakNet could do this internally?


One more request to Rakkar:
Can Send() have a time-out for reliable messages. This means an extra parameter with the send message.
This would hold good only for RELIABLE and RELIABLE_ORDERED messages. The time out would be ignored for other types.
If the time-out is zero, then the message would end up in the queue for ever, until it was successfully received by the receiver.

But if a time out is mentioned (in milliseconds), then the message will be deleted from the queue as soon as the time out is over.

This would be helpful when you want to send "reliable" messages, but they are not that important that they start clogging the network.

Regards
Knox.


Valen

  • Full Member
  • ***
  • Posts: 117
  • Karma: 5
    • View Profile
Re: Does RakNet detect a modified packet, when encryption is not enabled?
« Reply #1 on: December 10, 2005, 11:45:04 AM »
One more request to Rakkar:
Can Send() have a time-out for reliable messages. This means an extra parameter with the send message.
This would hold good only for RELIABLE and RELIABLE_ORDERED messages. The time out would be ignored for other types.
If the time-out is zero, then the message would end up in the queue for ever, until it was successfully received by the receiver.

But if a time out is mentioned (in milliseconds), then the message will be deleted from the queue as soon as the time out is over.

This would be helpful when you want to send "reliable" messages, but they are not that important that they start clogging the network.


You can specify the priority of a packet when sending it, and you can also send packets on different ordering streams. So if you have unimportant packets to send, you can send them on a low priority ordering stream, and important packets can be sent on a high priority ordering stream. The info about that is here: http://www.rakkarsoft.com/raknet/manual/sendingpackets.html  And by the way, what you're suggesting doesn't make sense because dropping a packet after a timeout would make it unreliable, which defeats the whole point of specifying that you want to send as RELIABLE.
« Last Edit: December 10, 2005, 11:49:29 AM by Valen »

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: Does RakNet detect a modified packet, when encryption is not enabled?
« Reply #2 on: December 10, 2005, 12:20:52 PM »
You can only detect modified packets if encryption is enabled.