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

Do not fail on unknown option of bond and vlan #73

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

cathay4t
Copy link
Member

@cathay4t cathay4t commented Dec 4, 2023

Two patches to fix LinkInfo for bond and vlan where we should always store
unknown option to Other(DefaultNla) instead of raising error.

All InfoData not properly parsed is changed from Vec<u8> to Vec<InfoXXX> with place holder.

We should always use `Other()` to hold unknown bond options.

Signed-off-by: Gris Ge <[email protected]>
We should always use `Other` to store unknown option instead of raise
error.

Signed-off-by: Gris Ge <[email protected]>
Copy link

codecov bot commented Dec 4, 2023

Codecov Report

Attention: 367 lines in your changes are missing coverage. Please review.

Comparison is base (6d01953) 65.28% compared to head (9cb28bf) 63.38%.

Files Patch % Lines
src/link/link_info/info_data.rs 53.09% 106 Missing ⚠️
src/link/link_info/bond.rs 49.01% 52 Missing ⚠️
src/link/link_info/gre.rs 0.00% 23 Missing ⚠️
src/link/link_info/gre6.rs 0.00% 23 Missing ⚠️
src/link/link_info/gre_tap.rs 0.00% 23 Missing ⚠️
src/link/link_info/gre_tap6.rs 0.00% 23 Missing ⚠️
src/link/link_info/gtp.rs 0.00% 23 Missing ⚠️
src/link/link_info/sit.rs 0.00% 23 Missing ⚠️
src/link/link_info/tun.rs 0.00% 23 Missing ⚠️
src/link/link_info/vti.rs 0.00% 23 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
- Coverage   65.28%   63.38%   -1.91%     
==========================================
  Files         121      131      +10     
  Lines        8059     8288     +229     
==========================================
- Hits         5261     5253       -8     
- Misses       2798     3035     +237     

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

All `InfoData` not properly parsed is changed from `Vec<u8>` to
`Vec<InfoXXX>` with place holder.

Signed-off-by: Gris Ge <[email protected]>
@cathay4t cathay4t merged commit 07e3e54 into rust-netlink:main Dec 4, 2023
8 of 10 checks passed
@cathay4t cathay4t deleted the fix_link_info branch December 4, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant