Coder Social home page Coder Social logo

DTLS fragmentation error? about bc-csharp HOT 4 CLOSED

ds600 avatar ds600 commented on August 15, 2024
DTLS fragmentation error?

from bc-csharp.

Comments (4)

ds600 avatar ds600 commented on August 15, 2024

Probably not a problem of bouncy castle, but of another library that I use (CoAP.NET) that handles some of the DTLS session management. I'll close this issue until I can be certain

from bc-csharp.

peterdettman avatar peterdettman commented on August 15, 2024

We call GetReceiveLimit on the DtlsTransport to size the receive buffer, so it's important to return an appropriate value there. In any case a call to DtlsTransport.Receive should never return a value larger than the available space in the buffer. I've added an extra guard for the latter case.

Note that individual datagrams may contain one or more complete records (no record splitting across datagrams); this usually only happens during the handshake. Individual handshake messages may also be fragmented across multiple records.

from bc-csharp.

ds600 avatar ds600 commented on August 15, 2024

I just found out that this issue is not happening because of fragmentation, but because the buffer of the previous (smaller) message is used and it tries to push the new message in a wrong buffer. I'll continue my investigation on how this is happening. This only happens when the messages are received at quite a high interval

from bc-csharp.

ds600 avatar ds600 commented on August 15, 2024

For now, I think you shouldn't put any work in, as I can't guarantee that it's not because of my CoAP library

from bc-csharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.