fix: stop differential apply rewriting unchanged rules #18
Reference in New Issue
Block a user
Delete Branch "benvin/diff-expr-equality"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan re-added unchanged rules every run (string-compared exprs, kernel-canonicalised Queue/Redir) and applied changes in random order, breaking first-match chains.
reflect.DeepEqual); compile Queue (Total: 1) and Redir (RegisterProtoMax,NF_NAT_RANGE_PROTO_SPECIFIED) in the shape the kernel reads back (verified in a netns).InsertRule+Position) or append.cs.Add/cs.Removeare still built by rangingdesiredByTag/currentByTag(map order), so across tags the order is random; rule order within a chain is first-match, so a fresh apply or multi-rule replace can land rules in a random order, andSummary()output is unstable → iterate in a deterministic order (desired chain order then slice index, or sort keys) and assert it in a test.NFQueueor redirect-with-port rule indiffTestConfig) and never compares against a kernel-readback-shaped state, so reverting those two compiler.go changes keeps it green → add an nfqueue rule and a redirect-with-port rule, and compare against a hand-built readback-shaped state (Queue Total 1; Redir Min/Max=1 + PROTO_SPECIFIED).reflect.DeepEqual.No findings.
No findings.