Network icon indicating copy to clipboard operation
Network copied to clipboard

Abusing NACK caused large number of packet wrong retransmissions

Open b23r0 opened this issue 3 years ago • 9 comments

The Raknet protocol was not processed correctly, so that although the Geyser server received many packets correctly, it still sent a NACK to tell the client that it did not receive it, causing the client to retransmit for no reason, wasting a lot of bandwidth.

161919282-87d004ac-815b-4761-8806-4abbf44c37ae

b23r0 avatar Jun 10 '22 09:06 b23r0

Can you re try with my branch https://github.com/CraftersMC/Network/tree/datagram-fixes it should be fixed with my changes, if that is the case I might create a PR.

irrld avatar Jun 10 '22 09:06 irrld

Do note that Geyser isn't on the very latest Network version.

Camotoy avatar Jun 10 '22 13:06 Camotoy

I'm using the latest version (https://github.com/CraftersMC/Network/tree/datagram-fixes), but still found that there is a bug in using NAK. Hope to double check and fix the issue.

1655996045(1)

As shown in the figure above, although the packet with the correct sequence number has been received, it is still reply NAK. This is not correct.

This will cause a large number of packets to be erroneously retransmitted, significantly reducing transmission performance.

You can refer to my version of raknet implementation using rust. https://github.com/b23r0/rust-raknet

b23r0 avatar Jun 23 '22 14:06 b23r0

You are getting NAKS with my branch on your local network right?

Its really weird I've never had this issue on local network. Are you sure everything is updated?

irrld avatar Jun 23 '22 15:06 irrld

And also are those NAKS from client or GeyserMC?

irrld avatar Jun 23 '22 15:06 irrld

from GeyserMC

b23r0 avatar Jun 23 '22 15:06 b23r0

You are getting NAKS with my branch on your local network right?

Its really weird I've never had this issue on local network. Are you sure everything is updated?

sure,this is my local network,everything is updated

b23r0 avatar Jun 23 '22 16:06 b23r0

I think you should try to reproduce the problem with geysermc first.

b23r0 avatar Jun 23 '22 16:06 b23r0

Geyser is now using the latest Network version from Cloudburst.

Camotoy avatar Jul 13 '22 15:07 Camotoy