google / google/gopacket

Wrong assumptions on SCTP data chunk and design issue..

Open
#347 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

In one SCTP package we can have _multiple_ SCTPData chunks. The current code doesn't support it and will provide all other chunks as payload. I removed the special case of decodeSCTPChunk and then put a Payload into the SCTPData struct. One issue is that the test data is kind of invalid...

The fundamental issue is that the structure of SCTP is like this.

```
IP
SCTP
SCTPDataChunk
Payload
SCTPDataChunk
Payload
```

While p.NextDecoder will just be linear. We would need to have some kind of special "Payload" so we can jump to the next SCTPDataChunk. Alternatively be always eager for SCTP...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.