Skip to content
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