Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

family takes values based on IP type#71

Merged
larseggert merged 2 commits into
mozilla:mainfrom
vnt-dev:main
Jan 16, 2025
Merged

family takes values based on IP type#71
larseggert merged 2 commits into
mozilla:mainfrom
vnt-dev:main

Conversation

@vnt-dev

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

Copy link
Copy Markdown
Contributor

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

@vnt-dev

vnt-dev commented Jan 16, 2025

Copy link
Copy Markdown
Contributor Author
> 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))

@codecov

codecov Bot commented Jan 16, 2025

Copy link
Copy Markdown

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.

@larseggert larseggert left a comment

Copy link
Copy Markdown
Collaborator

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

vnt-dev commented Jan 16, 2025

Copy link
Copy Markdown
Contributor Author

Why did the codecov/project check fail?

@larseggert

Copy link
Copy Markdown
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

vnt-dev commented Jan 16, 2025

Copy link
Copy Markdown
Contributor Author

May I ask why this PR was closed?

@larseggert

Copy link
Copy Markdown
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
@larseggert

Copy link
Copy Markdown
Collaborator

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants