You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having some trouble sending DTLS messages.
I created some very basic DTLSClientHello like so:
p = DTLSRecord(version=version)/DTLSHandshake()/DTLSClientHello(cipher_suites=cipher)
and send it via a UDP socket to the DTLS server:
s.sendto(bytes(p), (ip, port))
However examining the Wireshark trace and the output of p.show2() shows, that the fragment_offset field of the DTLSHandshake layer get's initialized to x = len(pkt.payload) in the i2m function.
This is not right as the RFC states:
fragment_offset (the number of bytes
contained in previous fragments)
and no previous fragments have been sent.
Any help appreciated.
Cheers Skllrn
The text was updated successfully, but these errors were encountered:
In order to calculate the fragment_offset one would have to inspect the package, determine if the payload is bigger than the networks MTU and split the payload accordingly onto multiple DTLSRecords.
It would be neccessary to make sendall in TLSSocket do these splits and calculate the three affected fields
length fragment_length fragment_offset
of the DTLSHandshake object accordingly.
The recvall function in contrast should detect the fragments, buffer them and reasemble when all fragements are received.
Not sure I can do it without guidance but I'll have a try.
Hi,
I'm having some trouble sending DTLS messages.
I created some very basic DTLSClientHello like so:
p = DTLSRecord(version=version)/DTLSHandshake()/DTLSClientHello(cipher_suites=cipher)
and send it via a UDP socket to the DTLS server:
s.sendto(bytes(p), (ip, port))
However examining the Wireshark trace and the output of
p.show2()
shows, that thefragment_offset
field of the DTLSHandshake layer get's initialized tox = len(pkt.payload)
in the i2m function.This is not right as the RFC states:
and no previous fragments have been sent.
Any help appreciated.
Cheers Skllrn
The text was updated successfully, but these errors were encountered: