PeerConnectionId::cloneBuffer should use absolute bulk get

XMLWordPrintable

    • Fix Understood

      PeerConnectionId has a constructor that takes a ByteBuffer containing the peer connection id bytes. This constructor extracts the connection id bytes from the given byte buffer and makes a private copy for itself. However, while doing so, it uses a relative bulk get instead of an absolute bulk get, which causes the original byte buffer position to move to the limit.

      This is causing trouble on the server side, this is the only place where that constructor is used without making a slice of the original buffer first. In some circumstances (if the connection id is not found) it can cause the first initial packet to get dropped after creating the connection. This went unnoticed because the client will then retransmit that packet, and the connection id will be found the next time around.

      Though the issue is in product source code it only affects the server side used by httpclient tests.

            Assignee:
            Daniel Fuchs
            Reporter:
            Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: