Why does fixup_packet
only update total_length
when length == buflen
?
#556
Unanswered
fujiapple852
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't understand this check:
libpnet/pnet_transport/src/lib.rs
Line 345 in da0124d
It prevents the
total_length
from being corrected (on OSX) unless the size of the buffer provided toTransportReceiver
exactly matches thelength
.I assume it relates to the comment?
libpnet/pnet_transport/src/lib.rs
Lines 341 to 342 in da0124d
Running locally I had to bypass this check to get things to work (with
TransportChannelType::Layer3(IpNextHeaderProtocols::Icmp)
), so i'm wondering if it's a bug or if there is a good reason it exists that I've overlooked?Beta Was this translation helpful? Give feedback.
All reactions