Issue #19: Tag iptables rules by queue number so cleanup survives a kill. #57

Merged
danny merged 1 commit from issue19_firewall_rules_maintenance into main 2026-07-04 14:30:53 +01:00
danny commented 2026-07-04 14:22:44 +01:00 (Migrated from gitlab.keyop.co.uk)

deleteNfqIptablesRules ran at startup to remove stale rules, but the comment
tag was keyed on the process's own PID, so it could never match anything left
by a previous, uncleanly-terminated (e.g. killed) run. Rules are now tagged
with a stable, queue-number-scoped prefix (PID is still recorded for
per-rule debugging), and startup cleanup runs after initNfqueue's exclusive
queue bind succeeds, so a misconfigured same-queuenum double-start can't
delete a live sibling instance's rules.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

https://gitlab.keyop.co.uk/keyop/go/nfq_forwarder/-/work_items/19

deleteNfqIptablesRules ran at startup to remove stale rules, but the comment tag was keyed on the process's own PID, so it could never match anything left by a previous, uncleanly-terminated (e.g. killed) run. Rules are now tagged with a stable, queue-number-scoped prefix (PID is still recorded for per-rule debugging), and startup cleanup runs after initNfqueue's exclusive queue bind succeeds, so a misconfigured same-queuenum double-start can't delete a live sibling instance's rules. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> https://gitlab.keyop.co.uk/keyop/go/nfq_forwarder/-/work_items/19
danny commented 2026-07-04 14:22:44 +01:00 (Migrated from gitlab.keyop.co.uk)

requested review from @danny

requested review from @danny
danny commented 2026-07-04 14:22:44 +01:00 (Migrated from gitlab.keyop.co.uk)

assigned to @danny

assigned to @danny
danny (Migrated from gitlab.keyop.co.uk) approved these changes 2026-07-04 14:22:44 +01:00
danny commented 2026-07-04 14:30:29 +01:00 (Migrated from gitlab.keyop.co.uk)

LGTM and seems to work in practice.

LGTM and seems to work in practice.
danny commented 2026-07-04 14:30:30 +01:00 (Migrated from gitlab.keyop.co.uk)

approved this merge request

approved this merge request
danny commented 2026-07-04 14:30:54 +01:00 (Migrated from gitlab.keyop.co.uk)

mentioned in commit 2e09fff4a9

mentioned in commit 2e09fff4a99b6257552c5a5642bc45383ec3c499
danny (Migrated from gitlab.keyop.co.uk) merged commit 2e09fff4a9 into main 2026-07-04 14:30:54 +01:00
danny commented 2026-07-06 07:42:17 +01:00 (Migrated from gitlab.keyop.co.uk)

mentioned in commit ebace5f679

mentioned in commit ebace5f67981a64d31e64ca91d0ad4c5e4e7ca4b
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
keyop-go/nfq_forwarder!57
No description provided.