I was in the assumption, that you have to write sockets that take fragmented packets and combine them into one full packet, if you don't it will be your end.
Atleast thats what korvacs and many others told me back in the days. I never questioned them because I was looking up to them.. So today at my usual research routine i came across the following:
I was curious and implemented a logger on Xio to tell if there were any packets of the wrong size. Result after 24h and a few 100.000 packets
0
Okay, incomming packets get merged by the stack, fine, how about outgoing packets? A packet larger than 800ish bytes closes the client, so lets send an attack packet with the size 900 and split it in two 400's.
Result: Client closes after the 2nd packet. Now, this is my problem right here which makes me question my entire research.
WinPCAP and Wireshark locked and loaded.
Turns out any packet larger than 569 bytes gets split. The maximum packetsize i can transmit is 569 bytes. my mtu is 1500 on both OS and Router. I'm really lost at this point.
Atleast thats what korvacs and many others told me back in the days. I never questioned them because I was looking up to them.. So today at my usual research routine i came across the following:
andQuote:
Fragmentation, packet loss, and retransmission is all handled inside TCP/IP. Your application doesn't need to worry about it. Your application should treat a TCP socket as a stream of bytes. The bytes you put in come out in the same order. How long it takes and how many come out at once is not guaranteed.
So basically, nobody needs a fragmentation handler / Packet splitter.Quote:
The Sockets API won't deliver you packet fragments, only complete packets. The TCP/IP stack will buffer received fragments until it has a complete packet, and if some fragments are lost the whole packet will be discarded and have to be retransmitted in its entirety.
I was curious and implemented a logger on Xio to tell if there were any packets of the wrong size. Result after 24h and a few 100.000 packets
0
Okay, incomming packets get merged by the stack, fine, how about outgoing packets? A packet larger than 800ish bytes closes the client, so lets send an attack packet with the size 900 and split it in two 400's.
Result: Client closes after the 2nd packet. Now, this is my problem right here which makes me question my entire research.
WinPCAP and Wireshark locked and loaded.
Turns out any packet larger than 569 bytes gets split. The maximum packetsize i can transmit is 569 bytes. my mtu is 1500 on both OS and Router. I'm really lost at this point.