Skip to content

geneve: implement DecodingLayer#115

Merged
mosajjal merged 1 commit intogopacket:masterfrom
kaworu:pr/kaworu/geneve-decodinglayer-fix
Apr 13, 2025
Merged

geneve: implement DecodingLayer#115
mosajjal merged 1 commit intogopacket:masterfrom
kaworu:pr/kaworu/geneve-decodinglayer-fix

Conversation

@kaworu
Copy link
Copy Markdown
Contributor

@kaworu kaworu commented Mar 25, 2025

Before this patch, the Geneve layer would not fully implement DecodingLayer. This would prevent Geneve to be added as a DecodingLayer to gopacket.NewDecodingLayerParser():

cannot use &Geneve{} (value of type *Geneve) as gopacket.DecodingLayer value in argument to gopacket.NewDecodingLayerParser: *Geneve does not implement gopacket.DecodingLayer (missing method CanDecode)

This patch implements (*Geneve).CanDecode() and a test to ensure Geneve can be used as a DecodingLayer.

Before this patch, the Geneve layer would not fully implement
DecodingLayer. This would prevent Geneve to be added as a DecodingLayer
to gopacket.NewDecodingLayerParser():

    cannot use &Geneve{} (value of type *Geneve) as gopacket.DecodingLayer value in argument to gopacket.NewDecodingLayerParser: *Geneve does not implement gopacket.DecodingLayer (missing method CanDecode)

This patch implements (*Geneve).CanDecode() and a test to ensure Geneve
can be used as a DecodingLayer.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
kaworu added a commit to kaworu/cilium that referenced this pull request Apr 1, 2025
Waiting on gopacket/gopacket#115.

If it's not merged and released before this PR land then we might need
to comment out Geneve parsing in Hubble.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
@mosajjal mosajjal merged commit 2b39da4 into gopacket:master Apr 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants