Skip to content

fix(ipv4): word the SEC termination-indicator warning the right way round (#2295) - #2372

Merged
JarryShaw merged 1 commit into
mainfrom
fix/2295-ipv4-sec-warning
Oct 27, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
fix/2295-ipv4-sec-warning

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • fix — bug fix

Description

Closes #2295.

  • Problem: _read_opt_sec warns when the final protection-authority octet has its low-order bit (the RFC 1108 field termination indicator) set, but the message said the indicator was "not set" — backwards from what was observed.
  • Fix: describe the observed bit and its value, e.g. field termination indicator set on the final octet: 145.
  • Test: test_sec_termination_indicator_follows_rfc_1108 pins the exact message for SEC option 8204ab91.

…ound (#2295)

Problem: _read_opt_sec warns when the final protection authority octet
has its low-order bit (the RFC 1108 field termination indicator) set,
but the message said the indicator was "not set".

Fix: describe the observed bit and its value, as in
"field termination indicator set on the final octet: 145".

Test: test_sec_termination_indicator_follows_rfc_1108 pins the exact
message for SEC option 8204ab91.
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 27, 2026
@github-actions github-actions Bot added this to the PyPCAPKit v1.5 milestone Oct 27, 2026
@JarryShaw JarryShaw added bug Issues reporting a defect (set by the bug report template; a default, not an assessment) fix Pull requests that fix a defect (fix: subject prefix) labels Oct 27, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Review: GOOD TO GO at d5273f866 (Sonnet). Confirmed with real RFC 1108 SEC option bytes: on origin/main the warning said "not set" while the parsed model said the bit WAS set (backwards); on the PR head it correctly reports field termination indicator set on the final octet: 145. Six option-byte variants checked, RFC 1108 §2.4(a) read directly, unaffected paths (bit clear, non-final octet) unchanged. New test fails without the fix (confirmed). Clean merge onto current main, 97 tests + 588 subtests pass merged.

Ready to merge.
CI: 32 success / 7 skipped / 0 failed at review time, rest still queued.
Mergeable, 0 unresolved threads.

@JarryShaw

Copy link
Copy Markdown
Owner Author

Correction: "Ready to merge" above was premature — CI still has 13 checks not yet complete (pending/queued). Review verdict stands (GOOD TO GO), but holding the ready call until CI actually finishes.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.58% (unit tier, Python 3.15, d5273f866, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 19601 881 2620 867 92.12%
pcapkit/corekit 2596 74 818 37 96.51%
pcapkit/dumpkit 282 3 102 3 98.44%
pcapkit/foundation 3029 23 1050 25 98.82%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17455 218 4598 185 98.15%
pcapkit/toolkit 914 36 334 10 95.51%
pcapkit/utilities 502 7 144 5 98.14%
pcapkit/vendor 4432 1988 1018 167 51.87%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw

Copy link
Copy Markdown
Owner Author

Ready to merge — confirming this time with the full check state.

Review: GOOD TO GO (Sonnet) at d5273f866.
CI: Required checks passed, 0 failures (only the non-blocking experimental GraalPy leg still pending).
Mergeable, 0 unresolved threads.

@JarryShaw JarryShaw added the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 27, 2026
@JarryShaw
JarryShaw merged commit 88ec502 into main Oct 27, 2026
66 checks passed
@JarryShaw
JarryShaw deleted the fix/2295-ipv4-sec-warning branch October 27, 2026 15:14
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 27, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issues reporting a defect (set by the bug report template; a default, not an assessment) fix Pull requests that fix a defect (fix: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix(ipv4): SEC warning says the field termination indicator is not set when it is set

1 participant