Skip to content

ipv6nd: empty IPV6RA_EXPIRE eloop queue when dropping#586

Merged
rsmarples merged 1 commit intomasterfrom
fix-ipv6nd-expire
Feb 26, 2026
Merged

ipv6nd: empty IPV6RA_EXPIRE eloop queue when dropping#586
rsmarples merged 1 commit intomasterfrom
fix-ipv6nd-expire

Conversation

@rsmarples
Copy link
Member

Fixes #584

Helps #566

@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f48f695 and e380953.

📒 Files selected for processing (1)
  • src/ipv6nd.c

Walkthrough

This pull request addresses a segmentation fault occurring during IPv6 router discovery cleanup when ethernet links are toggled. The changes modify the ipv6nd_removefreedrop_ra function to safely deallocate router objects using queue-based timeout deletion and safer pointer handling.

Changes

Cohort / File(s) Summary
IPv6ND Router Cleanup Fix
src/ipv6nd.c
Added local ctx alias to eliminate repeated pointer traversals; replaced direct eloop timeout deletions with safer eloop_q_timeout_delete using the ELOOP_IPV6RA_EXPIRE queue; adjusted routing list removal to use ctx->ra_routers; added explicit free(rap) for proper memory deallocation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-ipv6nd-expire

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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 2a3fb4e into master Feb 26, 2026
2 of 17 checks passed
@rsmarples rsmarples deleted the fix-ipv6nd-expire branch February 26, 2026 17:58
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.

segfault when toggling ethernet link

1 participant