Conversation
c6b7c0b to
1052f70
Compare
b91865f to
62fa8cf
Compare
b16a408 to
f056282
Compare
31b0c2e to
cb050e5
Compare
|
@jrife I have changed to serivce_loopback_ipv6. If you have free time, can you have a look at it?. Currently, I am stuck at the condition in which source ip is not translated back to the service cluster IP. I think that the reverse NAT for the reply path is not being applied correctly. But, I have no idea which is going wrong. The logs show multiple SYN packets from [fd00:10:244:1::dc8e]:53060 to [fd00:10:96::cd54]:80, indicating that the client is retransmitting SYN packets, likely because it is not receiving properly formatted replies. $ k exec -ti -n kube-system cilium-qz7tt -- cilium-dbg monitor --related-to 542 Listening for events on 8 CPUs with 64x4096 of shared memory |
Off the top of my head, I'm not sure. I may have some time later this week to look at it in a bit more detail. In the meantime, I left a few comments. I'd recommend fixing whatever unit tests and checkpatch checks are failing and try testing again. The checkpatch stuff is likely similar to some of the formatting stuff I commented on. |
cb050e5 to
0850415
Compare
ea79b53 to
663eadc
Compare
This comment was marked as outdated.
This comment was marked as outdated.
663eadc to
3c14b86
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
gandro
left a comment
There was a problem hiding this comment.
Thanks for the PR. Unfortunately I think there are some minor changes needed
- add DebugEventType DBG_LB6_LOOPBACK_SNAT, DBG_LB6_LOOPBACK_SNAT_REV - regenerate flow.pb.go Signed-off-by: saiaunghlyanhtet <[email protected]>
Add agent-side support to enable IPv6 service loopback handling so that connections to a service’s own ClusterIP from a backend pod loop back correctly. Summary of changes: - Extend service / LB logic to recognize and mark IPv6 loopback scenarios - Introduce service_loopback_ipv6 runtime variable for IPv6 service loopback support Signed-off-by: saiaunghlyanhtet <[email protected]>
Introduce datapath logic to support IPv6 service loopback so that packets originating from a pod targeting its own service ClusterIP are correctly short-circuited and subject to the standard LB/rev-NAT path without external detours. Adjust service lookup / backend selection and reverse NAT handling for IPv6 loopback. Signed-off-by: saiaunghlyanhtet <[email protected]>
hairpin_flow_1_forward_v6: Test that sending a packet from a pod to its own IPv6 service gets source NAT-ed with the service loopback IPv6 address and is correctly forwarded to the pod's veth interface. Verifies SNAT behavior and connection tracking entries for IPv6 hairpin traffic. hairpin_flow_2_forward_ingress_v6: Test the ingress path for IPv6 hairpin flows where a packet from the service loopback address to a pod creates the appropriate connection tracking entry on the ingress side with the loopback flag. hairpin_flow_3_reverse_v6: Test that return traffic in an IPv6 hairpin flow (from pod back to service loopback address) is correctly handled and forwarded without any address translation, maintaining the original flow semantics. hairpin_flow_4_reverse_ingress_v6: Test the reverse direction ingress path for IPv6 hairpin flows where return traffic gets NAT-ed back to the original service IP address, completing the hairpin loop and ensuring the client sees responses from the expected service address. tc_drop_no_backend_v6: Test that IPv6 packets destined to a service with no available backends are correctly dropped with TC_ACT_SHOT, ensuring proper error handling for unavailable IPv6 services. Signed-off-by: saiaunghlyanhtet <[email protected]>
|
/test |
|
great stuff @saiaunghlyanhtet, glad to see this finally land! 🚀 I added a |
|
Congrats on getting this in @saiaunghlyanhtet! Your swift iterations on reviews made a big difference, especially for the details at the end 🙂 Don't hesitate to reach out if you need help on anything else! |
Service Loopback IPv6
Fixes: #26733