Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion marine/marine.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Marine:

def __init__(self, epan_auto_reset_count: Optional[int] = None):
if not os.getenv("WIRESHARK_DATA_DIR"):
os.putenv("WIRESHARK_DATA_DIR", str(MARINE_DATA_DIR))
os.environ["WIRESHARK_DATA_DIR"] = str(MARINE_DATA_DIR)
try:
cdll.LoadLibrary(MARINE_NAME)
except Exception:
Expand Down
4 changes: 4 additions & 0 deletions tests/marine/test_marine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,3 +1025,7 @@ def test_parse_fields_preserves_order(marine_instance: Marine, tcp_packet: bytes
"udp.srcport": None,
"tcp.srcport": "16424",
}


def test_filter_packet_larger_than_1514(marine_instance: Marine):
assert not marine_instance.filter(b"a" * 2500, display_filter="frame contains test")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should use a valid packet here to make sure dissection works properly for big packets