correctly store origin dst addr in map_of_dst_info at ipv4-mapped ipv…#765
correctly store origin dst addr in map_of_dst_info at ipv4-mapped ipv…#765kmesh-bot merged 1 commit intokmesh-net:mainfrom
Conversation
|
/retest |
|
Kmesh daemon will fail to restart: root@kurator-linux-0002:~/kmesh# kklp kmesh-8ktvh
none on /sys/fs/bpf type bpf (rw,relatime)
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --bpf-fs-path=\"/sys/fs/bpf\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --cgroup2-path=\"/mnt/kmesh_cgroup2\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --cni-etc-path=\"/etc/cni/net.d\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --conflist-name=\"\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --enable-bpf-log=\"true\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --enable-bypass=\"false\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --enable-mda=\"false\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --enable-secret-manager=\"false\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --help=\"false\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --mode=\"workload\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --plugin-cni-chained=\"true\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="oldGitVersion: 2800172400 newGitVersion: 2800172400" subsys=pkg/bpf
time="2024-08-23T07:22:17Z" level=info msg="kmesh start with Restart, load bpf maps and prog from last" subsys=pkg/bpf
time="2024-08-23T07:22:17Z" level=info msg="kmesh restart, not clean bpf map and prog" subsys=pkg/bpf
Error: bpf Load failed, field CgroupConnect4Prog: program cgroup_connect4_prog: load program: permission denied: 404: (7b) *(u64 *)(r10 -56) = r1: 405: (79) r6 = * (truncated, 278 line(s) omitted)
time="2024-08-23T07:22:17Z" level=error msg="bpf Load failed, field CgroupConnect4Prog: program cgroup_connect4_prog: load program: permission denied: 404: (7b) *(u64 *)(r10 -56) = r1: 405: (79) r6 = * (truncated, 278 line(s) omitted)" subsys=main
kmesh exit |
|
/retest |
Codecov ReportAll modified and coverable lines are covered by tests ✅
see 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
bpf/kmesh/workload/include/backend.h
Outdated
| value_tuple.ipv4.daddr = kmesh_ctx->orig_dst_addr.ip4; | ||
| value_tuple.ipv4.dport = ctx->user_port; | ||
| } else if (ctx->family == AF_INET6) { | ||
| if (!is_ipv4_mapped_addr(kmesh_ctx->orig_dst_addr.ip6)) |
There was a problem hiding this comment.
The return type is of type bool, so remove "!"?
There was a problem hiding this comment.
how can waypoint process ipv6(v4 mapped format)?
There was a problem hiding this comment.
waypoint could correctly handle pure ipv4, pure ipv6 and ipv4-mapped ipv6 address, ref: https://github.com/envoyproxy/envoy/blob/main/source/common/network/address_impl.cc#L87
As long as the address encoded in tlv is valid.
hzxuzhonghu
left a comment
There was a problem hiding this comment.
Should add an e2e test with bookinfo example and add namespace waypoint for each service
ref: #766 |
…6 scene Signed-off-by: kwb0523 <kwb0523@163.com>
|
/lgtm |
|
/cherry-pick release-0.4 /approve |
|
@hzxuzhonghu: once the present PR merges, I will cherry-pick it on top of release-0.4 in a new PR and assign it to you. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@hzxuzhonghu: new pull request created: #785 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
…6 scene
What type of PR is this?
/kind bug
What this PR does / why we need it:
In waypoint_manager func, the ipv6 addr in kmesh_ctx->orig_dst_addr.ip6 is reversed to ipv4 format, and this format of ipv6 address inapplicable for later waypoint processing, it need store the origin dst addr directly.
Which issue(s) this PR fixes:
Fixes #756
Special notes for your reviewer:
Does this PR introduce a user-facing change?: