You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pcapng: Name Resolution Block guards report the systemd Journal Export Block #1038
Name Resolution Block guards in pcapkit/protocols/misc/pcapng.py raise messages that name the wrong block. Seven sites check one block type and tell the caller about another.
The six ProtocolErrors at :3031, :3057 and :3085 (the read side) and :5140, :5171 and :5202 (the make side) all have this shape:
ifself._type!=Enum_BlockType.Name_Resolution_Block:
raiseProtocolError(f'PCAP-NG: [ns_dnsname] option must be in :manpage:`systemd(1)` Journal Export Block, 'f'but found in {self._type} block.')
The guard checks Name_Resolution_Block, but the message says "systemd(1) Journal Export Block". The ns_dns* options belong to the NRB. RegistryWarning at :966 has the same problem: register_record warns "systemd(1) journal export record already registered" for what is a nrb_record_* Name Resolution record.
Two side issues: these are runtime strings, so the embedded :manpage: reST role reaches the user as literal text. Two of the six sites also spell the option ns_dnsip4addr/ns_dnsip6addr where the others use ns_dnsIP4addr/ns_dnsIP6addr.
Fix: name the Name Resolution Block (and record) in all seven messages, and drop the reST role from them. Add a test that triggers one read-side guard and one make-side guard and asserts the block named in the message.
Blocked on #1037, an open docstring-only PR (#719 sweep) on the same file. This change waits until #1037 merges or closes, to avoid a conflict. Found while reviewing #1037.
Activity
JarryShaw commentedon Oct 5, 2026
Unblocked: #1037 merged. A worker is on the fix now.
fix(pcapng): name the Name Resolution Block in its guard messages (#1038
fix(pcapng): name if_rxspeed in its own guard messages (#1038)
fix(pcapng): name the Name Resolution Block in its guard messages (#1038
fix(pcapng): name if_rxspeed in its own guard messages (#1038)
fix(pcapng): name the Name Resolution Block in its guard messages (#1038