Skip to content

API break: link: Changing InfoIpTunnel::CollectMetadata(bool) to CollectMetadata#268

Merged
cathay4t merged 1 commit into
rust-netlink:mainfrom
cathay4t:main
Jun 9, 2026
Merged

API break: link: Changing InfoIpTunnel::CollectMetadata(bool) to CollectMetadata#268
cathay4t merged 1 commit into
rust-netlink:mainfrom
cathay4t:main

Conversation

@cathay4t

@cathay4t cathay4t commented Jun 9, 2026

Copy link
Copy Markdown
Member

The IFLA_IPTUN_COLLECT_METADATA is zero length flag attribute

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.66%. Comparing base (1fb4bd7) to head (220c30e).
⚠️ Report is 52 commits behind head on main.

Files with missing lines Patch % Lines
src/link/link_info/iptunnel.rs 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
+ Coverage   68.10%   68.66%   +0.55%     
==========================================
  Files         144      146       +2     
  Lines       10103    10525     +422     
==========================================
+ Hits         6881     7227     +346     
- Misses       3222     3298      +76     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the handling of the IFLA_IPTUN_COLLECT_METADATA attribute in IP tunnels to treat it as a zero-length flag. Feedback highlights a correctness issue where serializing CollectMetadata(false) will still send the flag to the kernel, causing it to be interpreted as true. It is recommended to either convert CollectMetadata to a unit variant or add an assertion to prevent silent misconfiguration.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/link/link_info/iptunnel.rs
…ectMetadata

The `IFLA_IPTUN_COLLECT_METADATA` is zero length flag attribute,
existence means true. Hence the old code `CollectMetadata(false)` will
never take effect.

Signed-off-by: Gris Ge <cnfourt@gmail.com>
@cathay4t cathay4t changed the title link ipip: Fix parsing of IFLA_IPTUN_COLLECT_METADATA API break: link: Changing InfoIpTunnel::CollectMetadata(bool) to CollectMetadata Jun 9, 2026
@cathay4t cathay4t merged commit c91e440 into rust-netlink:main Jun 9, 2026
10 of 11 checks passed
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