Repository navigation
Commit 7d346ac
committed
fix(toolkit): pyshark traces TCP behind an IPv4 extension header as the default engine does (#1625)
- tshark dissects TCP behind an AH or IPv6 extension header in IPv4 by its
own rules, and leaves the payload of a Mobility or HIP header out of the
PDML, so the pyshark engine traced TCP the default engine rejects there
and missed the TCP behind protocols 135 and 139.
- tcp_traceflow now reads such a frame's TCP from its octets, by the rules
the other engines share (pypcapfile's _upper_layer and _default_accepts),
up to EXTENSION_HEADER_LIMIT headers and through IP-in-IP tunnels.
- The engine fetches those octets from a second tshark pass (JSON with -x,
filtered to such frames), started on first use, read forward by frame
number, and closed with the first.
- Drop ipv4-33/pyshark/trace from the #1609 Gap row, which this fixes.
Tests: new tests/toolkit/test_pyshark_ipv4_extension_headers_1625_unit.py.1 parent ee324e1 commit 7d346ac
4 files changed
Lines changed: 813 additions & 20 deletions
File tree
- pcapkit
- foundation/engines
- toolkit
- tests
- foundation/engines
- toolkit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| |||
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
| 233 | + | |
| 234 | + | |
228 | 235 | | |
229 | 236 | | |
230 | 237 | | |
| |||
336 | 343 | | |
337 | 344 | | |
338 | 345 | | |
339 | | - | |
| 346 | + | |
340 | 347 | | |
341 | 348 | | |
342 | 349 | | |
| |||
348 | 355 | | |
349 | 356 | | |
350 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
351 | 398 | | |
352 | 399 | | |
353 | 400 | | |
354 | 401 | | |
355 | | - | |
| 402 | + | |
| 403 | + | |
356 | 404 | | |
357 | 405 | | |
358 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
0 commit comments