rule: populate Type field in RuleList and RuleListFiltered#1176
rule: populate Type field in RuleList and RuleListFiltered#1176chent1996 wants to merge 1 commit intovishvananda:mainfrom
Conversation
The Rule.Type field was missing from the Rule struct, causing RuleList and RuleListFiltered to always return Type as 0 regardless of the actual FIB rule action type (e.g. RTN_UNICAST, RTN_BLACKHOLE). Add Type field to Rule struct, populate it from msg.Type during deserialization, support setting it during rule creation, and add RT_FILTER_TYPE filtering support. Fixes vishvananda#1055
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing as duplicate of #1096 which provides a more comprehensive fix. |
Summary
Type intfield toRulestruct to expose the FIB rule action type (e.g.RTN_UNICAST,RTN_BLACKHOLE,RTN_UNREACHABLE)rule.Typefrommsg.Typeduring deserialization inRuleListFilteredmsg.Typefromrule.Typeduring rule creation inruleHandle()RT_FILTER_TYPEfiltering support forRuleListFilteredThis follows the same pattern used by
Route.Typein route handling.Fixes #1055
Summary by CodeRabbit