Skip to content

fix(pcapng): a big-endian Section Header Block rebuilds little-endian #1272

Closed

Description

@JarryShaw

Describe the bug
_make_block_shb forces self._byte = sys.byteorder (pcapkit/protocols/misc/pcapng.py:3658), ignoring the parsed byte order. Shows on dhcp_big_endian.pcapng.

To Reproduce
Parse then build from info:

in  0a0d0d0a 0000001c 1a2b3c4d 0001 0000 ffffffffffffffff 0000001c
out 0a0d0d0a 1c000000 4d3c2b1a 0100 0000 ffffffffffffffff 1c000000

Expected behavior
The section keeps its byte order (big-endian magic 1a2b3c4d).

Found by the misc round-trip audit (#1202). The repro was re-checked by an independent verifier, and I re-ran it on main at 11ae68ebf.

Activity

  1. added
    fixPull requests that fix a defect (fix: subject prefix)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 7, 2026
  2. JarryShaw commented on Oct 7, 2026

    @JarryShaw
    OwnerAuthor

    Blocked until the PCAP-NG K1-K5 PR (#1267-#1271) merges, because it edits the same three pcapng modules.

  3. added
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 7, 2026
  4. JarryShaw commented on Oct 7, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked: #1339 merged at 20:42Z. Back to pending.

  5. added
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 7, 2026
  6. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixPull requests that fix a defect (fix: subject prefix)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions