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

Kmesh: repair kmesh manager not effect in sockops on oe 23.03 #303

Merged
merged 1 commit into from
May 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion bpf/kmesh/workload/sockops_tuple.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,21 @@ static inline bool conn_from_cni_sim_add(struct bpf_sock_ops *skops)
(bpf_ntohl(skops->remote_port) == 0x3a1));
#else
return ((bpf_ntohl(skops->remote_ip4) == 1) &&
(bpf_ntohl(skops->remote_port) == 0xa1030000));
(bpf_ntohl(skops->remote_port) == 0x3a10000));
#endif
}

static inline bool conn_from_cni_sim_delete(struct bpf_sock_ops *skops)
{
// cni sim connect 0.0.0.1:930(0x3a2)
// 0x3a2 is the specific port handled by the cni for disable Kmesh
#if !OE_23_03
return ((bpf_ntohl(skops->remote_ip4) == 1) &&
(bpf_ntohl(skops->remote_port) == 0x3a2));
#else
return ((bpf_ntohl(skops->remote_ip4) == 1) &&
(bpf_ntohl(skops->remote_port) == 0x3a20000));
#endif
}

static inline bool ipv4_mapped_addr(__u32 ip6[4])
Expand Down
Loading