Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make Geneve implement DecodingLayer #1202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kaworu
Copy link

@kaworu kaworu commented Feb 7, 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 <[email protected]>
@kaworu
Copy link
Author

kaworu commented Feb 7, 2025

Didn't see there is already a PR open for this bug #1172

kaworu added a commit to kaworu/cilium that referenced this pull request Feb 14, 2025
Waiting on google/gopacket#1202.

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 <[email protected]>
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.

1 participant