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

feat: Obtain info via routing sockets #29

Merged
merged 135 commits into from
Nov 21, 2024
Merged

feat: Obtain info via routing sockets #29

merged 135 commits into from
Nov 21, 2024

Conversation

larseggert
Copy link
Collaborator

@larseggert larseggert commented Oct 1, 2024

This avoids the need to mess around with Internet sockets, which Firefox does not allow Rust code to do currently.

Also rolls in quite a few more changes.

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 93.77510% with 31 lines in your changes missing coverage. Please review.

Project coverage is 93.61%. Comparing base (14356bf) to head (0f1c742).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/bsd.rs 94.47% 9 Missing ⚠️
src/lib.rs 74.07% 7 Missing ⚠️
src/linux.rs 96.33% 7 Missing ⚠️
src/routesocket.rs 85.29% 5 Missing ⚠️
src/windows.rs 96.38% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
+ Coverage   92.94%   93.61%   +0.67%     
==========================================
  Files           1        5       +4     
  Lines         241      517     +276     
==========================================
+ Hits          224      484     +260     
- Misses         17       33      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@larseggert larseggert marked this pull request as ready for review October 2, 2024 11:42
@larseggert larseggert mentioned this pull request Oct 2, 2024
@larseggert larseggert requested a review from mozkeeler November 8, 2024 17:03
@larseggert
Copy link
Collaborator Author

@martinthomson @mxinden I think this is ready for you to take a look at. @mozkeeler's review improved things a lot.

Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

I found what I think is a bug in the BSD code. I'm not really done with the Linux code, but I'm toasted for today.

larseggert and others added 9 commits November 11, 2024 17:42
Co-authored-by: Martin Thomson <mt@lowentropy.net>
Co-authored-by: Martin Thomson <mt@lowentropy.net>
Co-authored-by: Martin Thomson <mt@lowentropy.net>
Co-authored-by: Martin Thomson <mt@lowentropy.net>
Co-authored-by: Martin Thomson <mt@lowentropy.net>
@larseggert
Copy link
Collaborator Author

larseggert commented Nov 21, 2024

I rolled this back to before I started to add Solaris support, which is now in #45.

@martinthomson I think you still had some things you needed to review?

@larseggert larseggert added this pull request to the merge queue Nov 21, 2024
Merged via the queue into main with commit 926a014 Nov 21, 2024
29 checks passed
@larseggert larseggert deleted the feat-from-routing branch November 21, 2024 13:33
mxinden added a commit to mxinden/mtu that referenced this pull request Nov 29, 2024
mozilla#29 added the following `libc` import:

``` rust
use libc::{
    freeifaddrs, getifaddrs, getpid, if_data, if_indextoname, ifaddrs, in6_addr, in_addr,
    sockaddr_in, sockaddr_in6, sockaddr_storage, AF_UNSPEC, PF_ROUTE, RTAX_MAX,
};
```

`RTAX_MAX` was added in `libc` `0.2.160`:

https://github.com/rust-lang/libc/releases/tag/0.2.160

More specifically rust-lang/libc#3714.

This commit makes sure the above new requirement is encoded in the `mtu`
`Cargo.toml` `libc` dependency declaration.

See CI failure without discussed in mozilla#51 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants