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

solarish: define IP_BOUND_IF and IPV6_BOUND_IF #4287

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

hawkw
Copy link
Contributor

@hawkw hawkw commented Feb 26, 2025

Description

These socket options are currently defined only on macOS and friends, but they exist on illumos and Solaris as well.

This commit defines these socket options on solarish operating systems.

Sources

On Solaris, see the man page ip(7P).

I'd like to provide a link to the illumos manual pages, but apparently https://illumos.org/man seems to be impacted by today's AWS outage.

The constants are defined in /usr/include/netinet/in.h:

eliza@atrium ~ $ uname -a
SunOS atrium 5.11 helios-2.0.22827 i86pc i386 i86pc
eliza@atrium ~ $ rg 'IP(V6)?_BOUND_IF' /usr/include
/usr/include/netinet/in.h
978:#define   IP_BOUND_IF                0x41    /* bind socket to an ifindex       */
1311:#define  IPV6_BOUND_IF              0x41    /* bind to an ifindex */

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI

# Description

These socket options are currently defined only on macOS and friends,
but they exist on illumos and Solaris as well.

This commit defines these socket options on solarish operating systems.

# Sources

On Solaris, see the man page [`ip(7P)`].

I'd like to provide a link to the illumos manual pages, but apparently
https://illumos.org/man seems to be impacted by today's AWS outage.

The constants are defined in `/usr/include/netinet/in.h`:

```console
eliza@atrium ~ $ uname -a
SunOS atrium 5.11 helios-2.0.22827 i86pc i386 i86pc
eliza@atrium ~ $ rg 'IP(V6)?_BOUND_IF' /usr/include
/usr/include/netinet/in.h
978:#define   IP_BOUND_IF                0x41    /* bind socket to an ifindex       */
1311:#define  IPV6_BOUND_IF              0x41    /* bind to an ifindex */
```

[`ip(7P)`]: https://docs.oracle.com/cd/E86824_01/html/E54777/ip-7p.html

# Checklist

- [x] Relevant tests in `libc-test/semver` have been updated
- [x] No placeholder or unstable values like `*LAST` or `*MAX` are
  included (see [rust-lang#3131](rust-lang#3131))
- [x] Tested locally (`cd libc-test && cargo test --target mytarget`);
  especially relevant for platforms that may not be checked in CI
@rustbot
Copy link
Collaborator

rustbot commented Feb 26, 2025

r? @tgross35

rustbot has assigned @tgross35.
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
Copy link
Collaborator

rustbot commented Feb 26, 2025

Some changes occurred in solarish module

cc @jclulow, @pfmooney

@hawkw
Copy link
Contributor Author

hawkw commented Feb 26, 2025

I'd like to see these changes backported to v0.2; I'm not sure if I can just stick @rustbot label stable-nominated in my comment or if that requires a maintainer?

@rustbot
Copy link
Collaborator

rustbot commented Feb 26, 2025

Error: Parsing relabel command in comment failed: ...'maintainer' | error: a label delta at >| '?'...

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

@hawkw
Copy link
Contributor Author

hawkw commented Feb 26, 2025

@rustbot label stable-nominated

@rustbot rustbot added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Feb 26, 2025
hawkw added a commit to hawkw/socket2-rs that referenced this pull request Feb 26, 2025
@hawkw
Copy link
Contributor Author

hawkw commented Feb 26, 2025

The CI failure for Test tier2 (aarch64-linux-android) seems to be just a GitHub Actions job hitting a 25-minute timeout, which I have to assume is not my fault (doubly so given that this branch doesn't touch anything Android-related).

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tgross35 tgross35 enabled auto-merge February 27, 2025 02:18
@tgross35 tgross35 added this pull request to the merge queue Feb 27, 2025
Merged via the queue into rust-lang:main with commit b550c6b Feb 27, 2025
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-solarish O-unix S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants