fix: add IPv6 address check to service_manager for waypoint routing#1572
fix: add IPv6 address check to service_manager for waypoint routing#1572shivansh-gohem wants to merge 1 commit intokmesh-net:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary of ChangesHello @shivansh-gohem, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical bug in the eBPF data plane's Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. IPv6 unseen, Proxy bypass, now it's fixed, Traffic flows anew. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly extends waypoint routing to support IPv6 by adding a check for IPv6 addresses in service_manager. The implementation is functional, but the condition can be simplified for better readability and efficiency. I've provided a suggestion to make the check more concise by using 64-bit comparisons and removing a redundant check.
ec48a71 to
3ad53b0
Compare
Signed-off-by: Shivansh Sahu <sahushivansh142@gmail.com>
3ad53b0 to
5418532
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR updates the
service_managerfunction in the eBPF data plane to support IPv6 waypoint routing.Previously, the
service_managerlogic only checked ifservice_v->wp_addr.ip4 != 0. This caused services with valid IPv6 waypoint addresses to be ignored and bypass the proxy.This fix introduces a check for the
ip6array to ensure that if either an IPv4 or IPv6 address is present, the traffic is correctly routed to the waypoint manager.Which issue this PR fixes:
Fixes #1460
Special notes for the reviewer:
The change is located in
bpf/kmesh/workload/include/service.h.I modified the conditional check to verify if any of the 4 segments of the IPv6 address are non-zero.