New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maximum transfer unit issue with official Bedrock servers #95
Comments
whirvis
pushed a commit
that referenced
this issue
Sep 12, 2018
I decided to make a few changes before releasing version 2.10.3. The main changes are that I moved all the code from RakNetUtils and ArrayUtils to the RakNet class and changed the com.whirvis.jraknet.utils.map class to com.whirvis.jraknet.map. I also made a small improvement when it comes to negotiating the MTU to use during connection: During connection, it is possible the server will respond with an MTU higher than the client was originally going to use (which is what caused bug #95) earlier. At first, I fixed this by simply ignoring this during connection unless an smaller MTU is requested by the server. From now on, it goes like this: If the server requests a higher MTU than the client was originally going to go with, the client will use that if and only if that MTU is not higher than the highest maximum transfer unit provided earlier before connection was attempted. If the server requests a lower MTU than what the client was originally going to go with, then the client will go with that. Also, when responding to OpenConnectionRequestOne, the server will now use its maximum transfer unit when responding with OpenConnectionResponseOne.
whirvis
pushed a commit
that referenced
this issue
Nov 6, 2019
whirvis
pushed a commit
that referenced
this issue
Nov 6, 2019
I decided to make a few changes before releasing version 2.10.3. The main changes are that I moved all the code from RakNetUtils and ArrayUtils to the RakNet class and changed the com.whirvis.jraknet.utils.map class to com.whirvis.jraknet.map. I also made a small improvement when it comes to negotiating the MTU to use during connection: During connection, it is possible the server will respond with an MTU higher than the client was originally going to use (which is what caused bug #95) earlier. At first, I fixed this by simply ignoring this during connection unless an smaller MTU is requested by the server. From now on, it goes like this: If the server requests a higher MTU than the client was originally going to go with, the client will use that if and only if that MTU is not higher than the highest maximum transfer unit provided earlier before connection was attempted. If the server requests a lower MTU than what the client was originally going to go with, then the client will go with that. Also, when responding to OpenConnectionRequestOne, the server will now use its maximum transfer unit when responding with OpenConnectionResponseOne.
whirvis
added a commit
that referenced
this issue
Nov 6, 2019
whirvis
added a commit
that referenced
this issue
Nov 6, 2019
I decided to make a few changes before releasing version 2.10.3. The main changes are that I moved all the code from RakNetUtils and ArrayUtils to the RakNet class and changed the com.whirvis.jraknet.utils.map class to com.whirvis.jraknet.map. I also made a small improvement when it comes to negotiating the MTU to use during connection: During connection, it is possible the server will respond with an MTU higher than the client was originally going to use (which is what caused bug #95) earlier. At first, I fixed this by simply ignoring this during connection unless an smaller MTU is requested by the server. From now on, it goes like this: If the server requests a higher MTU than the client was originally going to go with, the client will use that if and only if that MTU is not higher than the highest maximum transfer unit provided earlier before connection was attempted. If the server requests a lower MTU than what the client was originally going to go with, then the client will go with that. Also, when responding to OpenConnectionRequestOne, the server will now use its maximum transfer unit when responding with OpenConnectionResponseOne.
whirvis
added a commit
that referenced
this issue
Nov 10, 2019
whirvis
added a commit
that referenced
this issue
Nov 10, 2019
I decided to make a few changes before releasing version 2.10.3. The main changes are that I moved all the code from RakNetUtils and ArrayUtils to the RakNet class and changed the com.whirvis.jraknet.utils.map class to com.whirvis.jraknet.map. I also made a small improvement when it comes to negotiating the MTU to use during connection: During connection, it is possible the server will respond with an MTU higher than the client was originally going to use (which is what caused bug #95) earlier. At first, I fixed this by simply ignoring this during connection unless an smaller MTU is requested by the server. From now on, it goes like this: If the server requests a higher MTU than the client was originally going to go with, the client will use that if and only if that MTU is not higher than the highest maximum transfer unit provided earlier before connection was attempted. If the server requests a lower MTU than what the client was originally going to go with, then the client will go with that. Also, when responding to OpenConnectionRequestOne, the server will now use its maximum transfer unit when responding with OpenConnectionResponseOne.
whirvis
added a commit
that referenced
this issue
Nov 10, 2019
whirvis
added a commit
that referenced
this issue
Nov 10, 2019
I decided to make a few changes before releasing version 2.10.3. The main changes are that I moved all the code from RakNetUtils and ArrayUtils to the RakNet class and changed the com.whirvis.jraknet.utils.map class to com.whirvis.jraknet.map. I also made a small improvement when it comes to negotiating the MTU to use during connection: During connection, it is possible the server will respond with an MTU higher than the client was originally going to use (which is what caused bug #95) earlier. At first, I fixed this by simply ignoring this during connection unless an smaller MTU is requested by the server. From now on, it goes like this: If the server requests a higher MTU than the client was originally going to go with, the client will use that if and only if that MTU is not higher than the highest maximum transfer unit provided earlier before connection was attempted. If the server requests a lower MTU than what the client was originally going to go with, then the client will go with that. Also, when responding to OpenConnectionRequestOne, the server will now use its maximum transfer unit when responding with OpenConnectionResponseOne.
whirvis
added a commit
that referenced
this issue
Nov 10, 2019
whirvis
added a commit
that referenced
this issue
Nov 10, 2019
I decided to make a few changes before releasing version 2.10.3. The main changes are that I moved all the code from RakNetUtils and ArrayUtils to the RakNet class and changed the com.whirvis.jraknet.utils.map class to com.whirvis.jraknet.map. I also made a small improvement when it comes to negotiating the MTU to use during connection: During connection, it is possible the server will respond with an MTU higher than the client was originally going to use (which is what caused bug #95) earlier. At first, I fixed this by simply ignoring this during connection unless an smaller MTU is requested by the server. From now on, it goes like this: If the server requests a higher MTU than the client was originally going to go with, the client will use that if and only if that MTU is not higher than the highest maximum transfer unit provided earlier before connection was attempted. If the server requests a lower MTU than what the client was originally going to go with, then the client will go with that. Also, when responding to OpenConnectionRequestOne, the server will now use its maximum transfer unit when responding with OpenConnectionResponseOne.
whirvis
added a commit
that referenced
this issue
Feb 10, 2020
whirvis
added a commit
that referenced
this issue
Feb 10, 2020
I decided to make a few changes before releasing version 2.10.3. The main changes are that I moved all the code from RakNetUtils and ArrayUtils to the RakNet class and changed the com.whirvis.jraknet.utils.map class to com.whirvis.jraknet.map. I also made a small improvement when it comes to negotiating the MTU to use during connection: During connection, it is possible the server will respond with an MTU higher than the client was originally going to use (which is what caused bug #95) earlier. At first, I fixed this by simply ignoring this during connection unless an smaller MTU is requested by the server. From now on, it goes like this: If the server requests a higher MTU than the client was originally going to go with, the client will use that if and only if that MTU is not higher than the highest maximum transfer unit provided earlier before connection was attempted. If the server requests a lower MTU than what the client was originally going to go with, then the client will go with that. Also, when responding to OpenConnectionRequestOne, the server will now use its maximum transfer unit when responding with OpenConnectionResponseOne.
whirvis
added a commit
that referenced
this issue
Feb 11, 2020
whirvis
added a commit
that referenced
this issue
Feb 11, 2020
I decided to make a few changes before releasing version 2.10.3. The main changes are that I moved all the code from RakNetUtils and ArrayUtils to the RakNet class and changed the com.whirvis.jraknet.utils.map class to com.whirvis.jraknet.map. I also made a small improvement when it comes to negotiating the MTU to use during connection: During connection, it is possible the server will respond with an MTU higher than the client was originally going to use (which is what caused bug #95) earlier. At first, I fixed this by simply ignoring this during connection unless an smaller MTU is requested by the server. From now on, it goes like this: If the server requests a higher MTU than the client was originally going to go with, the client will use that if and only if that MTU is not higher than the highest maximum transfer unit provided earlier before connection was attempted. If the server requests a lower MTU than what the client was originally going to go with, then the client will go with that. Also, when responding to OpenConnectionRequestOne, the server will now use its maximum transfer unit when responding with OpenConnectionResponseOne.
whirvis
added a commit
that referenced
this issue
Feb 22, 2020
whirvis
added a commit
that referenced
this issue
Feb 22, 2020
I decided to make a few changes before releasing version 2.10.3. The main changes are that I moved all the code from RakNetUtils and ArrayUtils to the RakNet class and changed the com.whirvis.jraknet.utils.map class to com.whirvis.jraknet.map. I also made a small improvement when it comes to negotiating the MTU to use during connection: During connection, it is possible the server will respond with an MTU higher than the client was originally going to use (which is what caused bug #95) earlier. At first, I fixed this by simply ignoring this during connection unless an smaller MTU is requested by the server. From now on, it goes like this: If the server requests a higher MTU than the client was originally going to go with, the client will use that if and only if that MTU is not higher than the highest maximum transfer unit provided earlier before connection was attempted. If the server requests a lower MTU than what the client was originally going to go with, then the client will go with that. Also, when responding to OpenConnectionRequestOne, the server will now use its maximum transfer unit when responding with OpenConnectionResponseOne.
whirvis
added a commit
that referenced
this issue
Feb 22, 2020
whirvis
added a commit
that referenced
this issue
Feb 22, 2020
I decided to make a few changes before releasing version 2.10.3. The main changes are that I moved all the code from RakNetUtils and ArrayUtils to the RakNet class and changed the com.whirvis.jraknet.utils.map class to com.whirvis.jraknet.map. I also made a small improvement when it comes to negotiating the MTU to use during connection: During connection, it is possible the server will respond with an MTU higher than the client was originally going to use (which is what caused bug #95) earlier. At first, I fixed this by simply ignoring this during connection unless an smaller MTU is requested by the server. From now on, it goes like this: If the server requests a higher MTU than the client was originally going to go with, the client will use that if and only if that MTU is not higher than the highest maximum transfer unit provided earlier before connection was attempted. If the server requests a lower MTU than what the client was originally going to go with, then the client will go with that. Also, when responding to OpenConnectionRequestOne, the server will now use its maximum transfer unit when responding with OpenConnectionResponseOne.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When trying to figure out what MTU to use, the client will send what MTU it wants to use until the server responds. When the server responds, it is supposed to respond with the same MTU. If the MTU is higher, then the server could end up sending data that would be cut off. If it is lower, then then packets being sent by the client could be lost by the server. However, what Bedrock does is respond no matter what MTU you send as long as yours is lower than what it is using. This causes the RakNetClient to fail during connection. As a result, the login code will have to be redone to allow RakNetClient to connect to official Bedrock servers.
The text was updated successfully, but these errors were encountered: