google / google/gopacket

Handling of OSPFv2 / OSPFv3 not in line with the rest of the package

Open
#738 0 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

For most of the protocols that have different versions (e.g. IPv4 IPv6) there are also different LayerTypes. But when getting the LayerType of an OSPFv3 layer it returns OSPF. But the OSFP type doesn't implement layer. So when you want to use it you have to cast it to an OSFPv3 type or a OSPFv2 type but you need to use reflection to see which one.

This kind handeling layer types is out of sync with how other versioned layer types are handled and it disrupts the whole flow of handling the layers you get from packet.Layers().

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.