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

dns: Add support for IPv6 and variable length IPv4 headers. #2574

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

mauriciovasquezbernal
Copy link
Member

Support IPv6 nameservers and extend parsing logic to support IPv4 options.

Fixes: d772f2e ("dns: Parse DNS packet in user space")

Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
Copy link
Member

@blanquicet blanquicet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I was wondering if we could add some tests for this in the CI.

pkg/gadgets/trace/dns/types/dns.go Show resolved Hide resolved
Comment on lines +118 to +119
proto = load_byte(skb,
ETH_HLEN + offsetof(struct iphdr, protocol));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This could be taken from iph->protocol

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to handle this on a similar PR to #2579.

Support IPv6 nameservers and extend parsing logic to support IPv4 options.

Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
@mauriciovasquezbernal
Copy link
Member Author

LGTM! I was wondering if we could add some tests for this in the CI.

I fear it's too complicated. We'll need to have a cluster with ipv6 enabled, and/or being able to run containers with ipv6. I can open an issue to handle this later on.

@mauriciovasquezbernal mauriciovasquezbernal merged commit 284aaba into main Mar 7, 2024
59 checks passed
@mauriciovasquezbernal mauriciovasquezbernal deleted the mauricio/add-ipv6-support-dns branch March 7, 2024 16:08
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.

None yet

3 participants