Skip to content

Conversation

@ColinMcInnes
Copy link
Contributor

Fallback time option was updating request_time instead of fallback_time.

Resolves #561

Fallback time option was updating request_time instead of fallback_time.

Resolves NetworkConfiguration#561
@coderabbitai
Copy link

coderabbitai bot commented Nov 27, 2025

Walkthrough

A single field assignment correction in the O_FALLBACK_TIME option handler, changing from updating request_time to fallback_time to properly store user-configured fallback timeout values.

Changes

Cohort / File(s) Summary
O_FALLBACK_TIME option field correction
src/if-options.c
Changed the O_FALLBACK_TIME option handler to assign the parsed timeout value to the fallback_time field instead of request_time, correcting which internal field stores the user-provided fallback time. Parsing logic and error handling remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

The change is a straightforward single-line field assignment correction that directly addresses the linked issue without introducing logic changes or side effects.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix fallback_time option' directly describes the main change: correcting the fallback_time option to update the correct internal field.
Description check ✅ Passed The description clearly states the bug being fixed (fallback_time option updating request_time instead) and references the related issue #561.
Linked Issues check ✅ Passed The code change addresses issue #561 by correcting the O_FALLBACK_TIME option to update fallback_time field instead of request_time, ensuring user-configured fallback_time is properly evaluated.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to fixing the O_FALLBACK_TIME option handling in src/if-options.c, with no unrelated modifications detected.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9c48f4c and dce49dc.

📒 Files selected for processing (1)
  • src/if-options.c (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: netbsd (--disable-dhcp6)
  • GitHub Check: netbsd (--disable-dhcp6, -DSMALL)
  • GitHub Check: netbsd (--disable-ipv6)
  • GitHub Check: netbsd (--disable-ipv4ll)
  • GitHub Check: netbsd (--disable-arp, -DSMALL)
  • GitHub Check: netbsd (--disable-ipv6, -DSMALL)
  • GitHub Check: netbsd (--disable-ipv4ll, -DSMALL)
  • GitHub Check: netbsd
  • GitHub Check: netbsd (--disable-ipv4)
  • GitHub Check: netbsd (--disable-arp)
  • GitHub Check: netbsd (-DSMALL)
  • GitHub Check: netbsd (--disable-ipv4, -DSMALL)
  • GitHub Check: openbsd
  • GitHub Check: freebsd
🔇 Additional comments (1)
src/if-options.c (1)

2547-2555: Correct field now updated for fallback_time option

Changing the O_FALLBACK_TIME handler to write into ifo->fallback_time (instead of request_time) aligns this option with its name, the struct field initialized in default_config, and the patterns used by O_REQUEST_TIME / O_IPV4LL_TIME. Parsing, bounds, and error handling remain consistent, so this should reliably apply the user-configured fallback_time from dhcpcd.conf.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

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.

fallback_time set by the user is not evaluated

1 participant