Let the host choose where a guest's listening sockets bind
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- backend, networking
Hướng nghiên cứu
Start by reading the SandboxBuilder, AppSandbox, socket bind/listen handling, and restore paths; the issue does not name specific files or tests. Work out how redirected host addresses should be reported and translated by net_getsockname, including port-zero binds and restored listeners. Done means the host can choose distinct listener addresses for each sandbox while guests see their requested addresses; the TCP-versus-listen decision and port-zero naming question need resolution first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A guest's listening socket is a host socket, bound at exactly the address and port the guest asks for. For a host that runs many sandboxes in one process and puts its own front end in front of each, that causes four problems:
- A guest that binds
0.0.0.0, as most servers do, is reachable on every host interface, not only through the host's front end. - A restored guest re-binds the port it had at snapshot time. If another process or sandbox holds that port by then, the re-bind fails: the guest kernel logs
hostsock: cannot re-create a listening socket after restore, the listener is dead (acceptreturnsEIO, poll reports it hung up), andrestore()still returnsOk, so the host is not told. - Two sandboxes restored from one snapshot both try the same port, so only one of them can listen. If the guest set
SO_REUSEPORT, both bind, and the host kernel splits connections between them. - A guest that bound port 0 is silently given a different port on restore.
ListenPorts limits which ports a guest may bind, not where they are bound (#184 is related).
Proposal: a SandboxBuilder option that redirects listens. Whatever address and port a guest's listening socket asks for, the host socket is bound to an address the host chooses (for example 127.0.0.1:0), and AppSandbox reports the real address for each guest port, e.g. listen_addr(guest_port) -> Option<SocketAddr>. net_getsockname translates back to the guest's address, for listeners and the connections they accept. A restore re-establishes listeners through the same redirect, so each restored sandbox gets a port of its own.
Open questions:
- Bind comes before listen, so the host cannot yet tell a listener from a UDP server or a client choosing its source port. Should the redirect apply to TCP sockets only, or be decided at
listen? - How should
listen_addrname a guest listener that bound port 0?
- Ngôn ngữ chính
- Rust
- Star
- 72
- Fork
- 14
- Merge trung bình
- 15 giờ 29 phút
- Pull request đã merge (30 ngày)
- 40
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperlight-dev/hyperlight-unikraft
-
dependencies
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
hyperlight-dev/hyperlight-unikraft#136 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ci/nightly
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
hyperlight-dev/hyperlight-unikraft#290 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ci/nightly
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
hyperlight-dev/hyperlight-unikraft#288 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ci/nightly
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
hyperlight-dev/hyperlight-unikraft#285 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ci/nightly
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
hyperlight-dev/hyperlight-unikraft#262 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của hyperlight-dev/hyperlight-unikraft
Issue tương tự
-
area:compat area:operations documentation ready-for-agent type:afk
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ZcashFoundation/zinder#552 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
storytold/vectorcraft#9229 ·
Maintainer thường phản hồi trong vòng 1 ngày