Skip to content

route: Use HAVE_RT_MISSFILTER rather than a generic BSD define#626

Merged
rsmarples merged 1 commit into
masterfrom
miss
Jun 7, 2026
Merged

route: Use HAVE_RT_MISSFILTER rather than a generic BSD define#626
rsmarples merged 1 commit into
masterfrom
miss

Conversation

@rsmarples
Copy link
Copy Markdown
Member

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 7, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2d2b8a01-5c12-48c0-954c-8ab55dfe8426

📥 Commits

Reviewing files that changed from the base of the PR and between a0bd514 and 05f3894.

📒 Files selected for processing (2)
  • src/route.c
  • src/route.h

Walkthrough

This PR refactors miss-filter compile-time guards in the routing subsystem. A new HAVE_RT_MISSFILTER macro is introduced in the route header, replacing three instances of the BSD guard in rt_build that control miss-filter initialization, default route handling, and filter application logic.

Changes

Miss-filter compile-time guard refactor

Layer / File(s) Summary
Define HAVE_RT_MISSFILTER macro
src/route.h
The route header defines HAVE_RT_MISSFILTER as a BSD-conditional compile-time feature flag.
Apply HAVE_RT_MISSFILTER guards in route building
src/route.c
Three miss-filter blocks in rt_build are now guarded by HAVE_RT_MISSFILTER: resetting the miss-filter length, programming miss-filter state for the default route, and applying the miss-filter at the end of build.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the rationale for using HAVE_RT_MISSFILTER instead of BSD, and any impact or benefits of this change.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: replacing generic BSD conditional guards with a more specific HAVE_RT_MISSFILTER define.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch miss

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Infer (1.2.0)
src/route.c

src/route.c:40:10: fatal error: 'config.h' file not found
40 | #include "config.h"
| ^~~~~~~~~~
1 error generated.
Error: the following clang command did not run successfully:
/opt/infer-linux-x86_64-v1.2.0/lib/infer/facebook-clang-plugins/clang/install/bin/clang-18
@/tmp/coderabbit-infer/05f3894b4b67ac8057ad4c81fd34e9286a1fa59f-e1ac2b3b1161becb/tmp/clang_command_.tmp.ccf0a4.txt
++Contents of '/tmp/coderabbit-infer/05f3894b4b67ac8057ad4c81fd34e9286a1fa59f-e1ac2b3b1161becb/tmp/clang_command_.tmp.ccf0a4.txt':
"-cc1" "-load"
"/opt/infer-linux-x86_64-v1.2.0/lib/infer/infer/bin/../../facebook-clang-plugins/libtooling/build/FacebookClangPlugin.dylib"
"-add-plugin" "BiniouASTExporter" "-plugin-arg-BiniouASTExporter" "-"
"-plugin-arg-BiniouASTExporter" "PREPEND_CURRENT_DIR=1"
"-plugin-arg-BiniouASTExporter" "MAX_STRING_SIZE=65535" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free"
"-clear-ast-before-back

... [truncated 655 characters] ...

"
"/opt/infer-linux-x86_64-v1.2.0/lib/infer/facebook-clang-plugins/clang/install/lib/clang/18/include"
"-internal-isystem" "/usr/local/include" "-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include"
"-internal-externc-isystem" "/usr/include/x86_64-linux-gnu"
"-internal-externc-isystem" "/include" "-internal-externc-isystem"
"/usr/include" "-Wno-ignored-optimization-argument" "-Wno-everything"
"-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf"
"-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o"
"/tmp/coderabbit-infer/e1ac2b3b1161becb/file.o" "-x" "c" "src/route.c"
"-O0" "-fno-builtin" "-include"
"/opt/infer-linux-x86_64-v1.2.0/lib/infer/infer/bin/../lib/clang_wrappers/global_defines.h"
"-Wno-everything"


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rsmarples rsmarples merged commit 840f56d into master Jun 7, 2026
6 checks passed
@rsmarples rsmarples deleted the miss branch June 7, 2026 09:08
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.

1 participant