Skip to content

Add methods to TCP and UDP sockets to modify hop limit - #138744

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Mallets:set_ipv6_sock_hop_limit
Oct 17, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Mallets:set_ipv6_sock_hop_limit

Conversation

@Mallets

@Mallets Mallets commented Mar 20, 2025 •

Copy link
Copy Markdown
Contributor

View all comments

#94678 was closed because of time constraints of the original author (@kckeiks).

This PR is a refresh of #94678 where the original proposed changes are ported to the current status of the standard library.

In addition, this PR:

Issue: #139166

@rustbot

rustbot commented Mar 20, 2025

Copy link
Copy Markdown
Collaborator

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 20, 2025
@ibraheemdev

Copy link
Copy Markdown
Member

r? libs-api because it's been a while since the original PR was approved.

@rustbot rustbot added the T-libs-api [DEPRECATED; DO NOT USE] label Mar 28, 2025
@rustbot rustbot assigned dtolnay and unassigned ibraheemdev Mar 28, 2025
Comment thread library/std/src/net/tcp.rs Outdated
Comment thread library/std/src/net/tcp.rs Outdated
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 30, 2025
@rustbot rustbot added the has-merge-commits PR has merge commits, merge with caution. label Mar 31, 2025
@rustbot

This comment has been minimized.

@Mallets
Mallets force-pushed the set_ipv6_sock_hop_limit branch from 7f790e2 to 9c1ee90 Compare March 31, 2025 10:13
@rustbot rustbot removed the has-merge-commits PR has merge commits, merge with caution. label Mar 31, 2025
@bors

bors commented Apr 13, 2025

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #139724) made this pull request unmergeable. Please resolve the merge conflicts.

@dtolnay

dtolnay commented Apr 13, 2025

Copy link
Copy Markdown
Member

Sorry—I missed that this was ready for review again. Please use @rustbot ready, which replaces S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label with S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. .

@dtolnay
dtolnay force-pushed the set_ipv6_sock_hop_limit branch from 9c1ee90 to 25fb525 Compare April 13, 2025 16:23
@dtolnay

dtolnay commented Apr 13, 2025

Copy link
Copy Markdown
Member

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 13, 2025
@dtolnay

dtolnay commented Apr 13, 2025

Copy link
Copy Markdown
Member

Thank you!

@bors r+

@bors

bors commented Apr 13, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 25fb525 has been approved by dtolnay

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 13, 2025
ChrisDenton added a commit to ChrisDenton/rust that referenced this pull request Apr 13, 2025
…=dtolnay

Add methods to TCP and UDP sockets to modify hop limit (refresh of rust-lang#94678)

rust-lang#94678 was closed because of time constraints of the original author (`@kckeiks).`

This PR is a refresh of rust-lang#94678 where the original proposed changes are ported to the current status of the standard library.

In addition, this PR:
- implements the change suggested in rust-lang#94678 (comment)
- defines `set_multicast_hop_limit_v6` and `multicast_hop_limit_v6 ` only for UDP sockets and not for TCP sockets as originally proposed

Issue: rust-lang#139166
@clarfonthey

Copy link
Copy Markdown
Contributor

@bors try jobs=various

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 3, 2026
Add methods to TCP and UDP sockets to modify hop limit (refresh of #94678)


try-job: *various*
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

💔 Test for b4e082d failed: CI. Failed jobs:

@Mallets

Mallets commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

eb18e7e fixes CI compilation for UEFI targets by returning unsupported().

Verified locally with:

./x build library/std --target aarch64-unknown-uefi,i686-unknown-uefi,x86_64-unknown-uefi

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 5, 2026
@jhpratt

jhpratt commented Oct 17, 2026

Copy link
Copy Markdown
Member

@bors squash

@rust-bors

This comment has been minimized.

…st-lang#94678)

* Add methods to TCP and UDP sockets to modify hop limit
* Use IPv6 addresses in hop_limit_v6 docs
* Update tracking issue to 139166
* Update docs according to PR review

* Fix unused_variables
* fix: add cfg guards on unsupported wasi p2 and p3 targets
* fix: tidy PAL and unsafe blocks CI failure
* fix: tidy CI
* fix: port tests to new TCP testing framework
* Trigger CI
* Fix TCP hop limit doctest indentation
* Use cfg_select for socket hop limit methods
* fix: UEFI IPv6 hop-limit stubs return unsupported

Co-authored-by: David Tolnay <dtolnay@gmail.com>
Co-authored-by: Luca Cominardi <luca.cominardi@datadoghq.com>
@rust-bors

rust-bors Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

🔨 13 commits were squashed into 52b5c71.

@rust-bors
rust-bors Bot force-pushed the set_ipv6_sock_hop_limit branch from eb18e7e to 52b5c71 Compare October 17, 2026 06:26
@rustbot

rustbot commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtrees.

@jhpratt jhpratt changed the title Add methods to TCP and UDP sockets to modify hop limit (refresh of #94678) Add methods to TCP and UDP sockets to modify hop limit Oct 17, 2026
@jhpratt

jhpratt commented Oct 17, 2026

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 52b5c71 has been tentatively approved by jhpratt

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 17, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Oct 17, 2026
…=jhpratt

Add methods to TCP and UDP sockets to modify hop limit

rust-lang#94678 was closed because of time constraints of the original author (@kckeiks).

This PR is a refresh of rust-lang#94678 where the original proposed changes are ported to the current status of the standard library.

In addition, this PR:
- implements the change suggested in rust-lang#94678 (comment)
- defines `set_multicast_hop_limit_v6` and `multicast_hop_limit_v6 ` only for UDP sockets and not for TCP sockets as originally proposed

Issue: rust-lang#139166
rust-bors Bot pushed a commit that referenced this pull request Oct 17, 2026
Rollup of 10 pull requests

Successful merges:

 - #161698 (Fix rmeta-link metadata not being read on AIX)
 - #163373 (Canonicalize operands for commutative binary ops)
 - #164016 (Tighten (absence of) return attribute checks in `some-abis-do-extend-params-to-32-bits.rs`)
 - #164424 (diagnostic: skip wrong loops when explaining borrow errors)
 - #138744 (Add methods to TCP and UDP sockets to modify hop limit)
 - #162444 (Make `std::fs::{File, ReadDir, DirEntry}` always `needs_drop` even when unsupported.)
 - #163862 (Collect all limit attributes during TyCtxt creation)
 - #164213 (make the safety documentation consistent in task::LocalWaker)
 - #164356 (Add missing full stop)
 - #164374 (core: hint: fix `unlikely`'s example polarity typo)
rust-bors Bot pushed a commit that referenced this pull request Oct 17, 2026
Rollup of 10 pull requests

Successful merges:

 - #161698 (Fix rmeta-link metadata not being read on AIX)
 - #163373 (Canonicalize operands for commutative binary ops)
 - #164016 (Tighten (absence of) return attribute checks in `some-abis-do-extend-params-to-32-bits.rs`)
 - #164424 (diagnostic: skip wrong loops when explaining borrow errors)
 - #138744 (Add methods to TCP and UDP sockets to modify hop limit)
 - #162444 (Make `std::fs::{File, ReadDir, DirEntry}` always `needs_drop` even when unsupported.)
 - #163862 (Collect all limit attributes during TyCtxt creation)
 - #164213 (make the safety documentation consistent in task::LocalWaker)
 - #164356 (Add missing full stop)
 - #164374 (core: hint: fix `unlikely`'s example polarity typo)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 17, 2026
…=jhpratt

Add methods to TCP and UDP sockets to modify hop limit

rust-lang#94678 was closed because of time constraints of the original author (@kckeiks).

This PR is a refresh of rust-lang#94678 where the original proposed changes are ported to the current status of the standard library.

In addition, this PR:
- implements the change suggested in rust-lang#94678 (comment)
- defines `set_multicast_hop_limit_v6` and `multicast_hop_limit_v6 ` only for UDP sockets and not for TCP sockets as originally proposed

Issue: rust-lang#139166
rust-bors Bot pushed a commit that referenced this pull request Oct 17, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #162809 (Remap local def ids for deterministic metadata encoding)
 - #163373 (Canonicalize operands for commutative binary ops)
 - #164016 (Tighten (absence of) return attribute checks in `some-abis-do-extend-params-to-32-bits.rs`)
 - #164259 (std: make SOLID `sockaddr_storage` large enough for IPv6)
 - #164424 (diagnostic: skip wrong loops when explaining borrow errors)
 - #138744 (Add methods to TCP and UDP sockets to modify hop limit)
 - #162444 (Make `std::fs::{File, ReadDir, DirEntry}` always `needs_drop` even when unsupported.)
 - #163862 (Collect all limit attributes during TyCtxt creation)
 - #164213 (make the safety documentation consistent in task::LocalWaker)
 - #164356 (Add missing full stop)
 - #164374 (core: hint: fix `unlikely`'s example polarity typo)
@rust-bors
rust-bors Bot merged commit 37a7c56 into rust-lang:main Oct 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-windows Operating system: Windows S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.