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

family takes values based on IP type #71

Merged
merged 2 commits into from
Jan 16, 2025
Merged

Conversation

vnt-dev
Copy link
Contributor

@vnt-dev vnt-dev commented Jan 16, 2025

On Windows, IPv6 and IPv4 can have different MTU values.

@vnt-dev
Copy link
Contributor Author

vnt-dev commented Jan 16, 2025

> netsh interface ipv6 show interfaces
Idx     Met         MTU          Status                Name
---  ----------  ----------  ------------  ---------------------------
 89           5        2000  connected     utun7
> netsh interface ipv4 show interfaces
Idx     Met         MTU          Status                Name
---  ----------  ----------  ------------  ---------------------------
 89           5        1400  connected     utun7
fn main() {
    let result = mtu::interface_and_mtu("cdcd:910a:2222:5498:8475:1111:3900:2021".parse().unwrap());
    println!("{result:?}");
    let result = mtu::interface_and_mtu("10.0.0.12".parse().unwrap());
    println!("{result:?}");
}
---------------------------
output
before modification:
Ok(("iftype53_32769", 1400))
Ok(("iftype53_32769", 1400))
after modification:
Ok(("iftype53_32769", 2000))
Ok(("iftype53_32769", 1400))

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.28%. Comparing base (9cd37ac) to head (0fffafe).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   86.46%   86.28%   -0.19%     
==========================================
  Files           5        5              
  Lines         554      554              
  Branches      554      554              
==========================================
- Hits          479      478       -1     
- Misses         47       48       +1     
  Partials       28       28              

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

Copy link
Collaborator

@larseggert larseggert left a comment

Choose a reason for hiding this comment

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

Thanks for the patch!

@vnt-dev
Copy link
Contributor Author

vnt-dev commented Jan 16, 2025

Why did the codecov/project check fail?

@larseggert
Copy link
Collaborator

There is one line it claims it's not seeing coverage for anymore: https://app.codecov.io/gh/mozilla/mtu/pull/71?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=checks&utm_campaign=pr+comments&utm_term=mozilla#0d46108ce4a3c312f023e721b094d40c-L111

That is likely wrong, or at least I don't think we hit that error condition before either. Codecov sometimes has discrepancies like that.

@larseggert larseggert enabled auto-merge January 16, 2025 07:54
@larseggert larseggert disabled auto-merge January 16, 2025 07:55
@larseggert larseggert closed this Jan 16, 2025
@vnt-dev
Copy link
Contributor Author

vnt-dev commented Jan 16, 2025

May I ask why this PR was closed?

@larseggert
Copy link
Collaborator

Sorry!! I meant to merge this. I think I need more coffee.

@larseggert larseggert reopened this Jan 16, 2025
@larseggert larseggert merged commit bb286ef into mozilla:main Jan 16, 2025
31 of 33 checks passed
@larseggert
Copy link
Collaborator

Thanks again for your contribution. Please let us know if there are other issues.

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.

2 participants