google / google/gopacket

can't decode packet with link-type LINUX_SLL2

Open
#1,109 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

when parsing packet captured with -iany on almalinux 9, it emits decode error:

sample code:
```
handle, err := pcap.OpenOffline(pcapFile)
if err != nil {
log.Fatal(err)
}
defer handle.Close()

packetSource := gopacket.NewPacketSource(handle, handle.LinkType())
for packet := range packetSource.Packets() {
log.Printf("%s\n", packet.Dump())
break
```
output:
```
2023/04/04 20:08:24 -- FULL PACKET DATA (80 bytes) ------------------------------------
00000000 08 00 00 00 00 00 00 02 00 01 04 06 52 54 00 66 |............RT.f|
....
--- Layer 1 ---
DecodeFailure Packet decoding error: Unable to decode LinkType 20
00000000 08 00 00 00 00 00 00 02 00 01 04 06 52 54 00 66 |............RT.f|
...
```
it seems that's because there's no LinkTypeLinuxSLL2 support.
@gconnell

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.