Skip to content

Drop packet instead of panicking if dst IP is unknown#3411

Merged
stevenengler merged 1 commit intoshadow:mainfrom
stevenengler:fix-packet-panic
Sep 12, 2024
Merged

Drop packet instead of panicking if dst IP is unknown#3411
stevenengler merged 1 commit intoshadow:mainfrom
stevenengler:fix-packet-panic

Conversation

@stevenengler
Copy link
Copy Markdown
Contributor

Closes #3148. Also added a regression test.

This was really easy to add now that we have log_once_per_value_at_level!().

[WARN] [testnode:11.0.0.1] [worker.rs:354] [shadow_rs::core::worker] (LOG_ONCE) Packet has destination 13.62.123.22 which doesn't exist in the simulation. Dropping the packet.

@stevenengler stevenengler self-assigned this Sep 12, 2024
@github-actions github-actions bot added Component: Testing Unit and integration tests and frameworks Component: Main Composing the core Shadow executable Component: Build Build/install tools and dependencies labels Sep 12, 2024
Copy link
Copy Markdown
Contributor

@sporksmith sporksmith left a comment

Choose a reason for hiding this comment

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

Nice use of python for a succinct regression test :)

@stevenengler stevenengler merged commit fdadd7c into shadow:main Sep 12, 2024
@stevenengler stevenengler deleted the fix-packet-panic branch September 12, 2024 20:14
@stevenengler stevenengler added the Tag: Tor Project 141 Tracking label for the Tor Project's Project 141; Can delete this when the project is complete label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Build Build/install tools and dependencies Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks Tag: Tor Project 141 Tracking label for the Tor Project's Project 141; Can delete this when the project is complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shadow panics if a packet is sent to an unknown IP address

2 participants