J1939SoftSocket: expand edge-case unit tests, soft↔native interop coverage, and pgn filter#33
J1939SoftSocket: expand edge-case unit tests, soft↔native interop coverage, and pgn filter#33Copilot wants to merge 8 commits into
Conversation
Agent-Logs-Url: https://github.com/polybassa/scapy-1/sessions/f6a2a521-bf16-4a7f-8ec3-dc07974f9205 Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
Agent-Logs-Url: https://github.com/polybassa/scapy-1/sessions/c15c0b92-d1c7-4994-aa40-05efeb53734b Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
|
@copilot Analyze the J1939 SoftSocket implementation from BenGardiner:j1939_scanning https://github.com/secdev/scapy/pull/4961/changes#diff-5d6504c729d8bfec31ff30aec28e76f32ae70eba914b2338540fe2b13a221f34 Check for useful modifications |
…rmatting bugs Agent-Logs-Url: https://github.com/polybassa/scapy-1/sessions/95d8553e-8c55-4ebe-bc14-ae49e72e2006 Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
…back) Agent-Logs-Url: https://github.com/polybassa/scapy-1/sessions/95d8553e-8c55-4ebe-bc14-ae49e72e2006 Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
Analyzed PR secdev#4961. Summary of what BenGardiner's implementation adds over ours, and what we incorporated: Already in our implementation (confirmed equivalent):
Incorporated from BenGardiner's approach:
Not incorporated (out of scope / too complex for this PR):
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
Try different URL formats for BenGardiner's PRurls = [
|
|
@copilot a few CI jobs fail because of the J1939 SoftSocket. fix them |
|
@copilot Continue |
- J1939TPImplementation.close() now waits up to 2s for the TX queue to drain and tx_state to return to IDLE before setting closed=True and cancelling scheduler handles. This ensures that send() followed immediately by close() (e.g. inside a 'with J1939SoftSocket(...) as s:' block) reliably delivers every queued message. - J1939TPImplementation.send() now cancels the current pending TX poll and reschedules it with timeout=0, so the message is dispatched within microseconds rather than waiting up to 5ms for the next poll. - Fix flake8 E501: add '# noqa: E501' to the overlong type comment on J1939SoftSocket.select(). Agent-Logs-Url: https://github.com/polybassa/scapy-1/sessions/36ad6c78-0858-434c-bf72-83f61e3da9b8 Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
Fixed in commit ae5bf26. Two root causes identified and fixed:
|
|
@copilot add more unit tests, using testsocket and slowtestsocket |
…am/_tx_start_rts Agent-Logs-Url: https://github.com/polybassa/scapy-1/sessions/5c82c8d1-e2dd-48bb-967f-02c01c3675cd Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
Agent-Logs-Url: https://github.com/polybassa/scapy-1/sessions/5c82c8d1-e2dd-48bb-967f-02c01c3675cd Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
|
@copilot continue |
…cket Agent-Logs-Url: https://github.com/polybassa/scapy-1/sessions/8c207b4c-0890-4005-9cd0-07acdde05894 Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
Added 5 more tests in commit c7cb328, bringing total non-root J1939 tests from 180 → 185 (all passing):
|
Uh oh!
There was an error while loading. Please reload this page.