meh / rust-packet

Network packet handling for Rust.
90 stars 27 forks source link

When Flags are 0x000, packet parsing causes panic #23

Open billylindeman opened 4 months ago

billylindeman commented 4 months ago

In my application I'm seeing panics on certain IPV4 packets:

called `Option::unwrap()` on a `None` value
stack backtrace:

I believe this is caused by calling Unwrap on the Flags::from_bits when no bitflags are set. This is the wireshark capture from the packet that caused the panic:

Screenshot 2024-03-07 at 9 19 22 AM