mirror of
https://github.com/mfontanini/libtins
synced 2026-01-26 12:01:34 +01:00
Fixed bug on IP when serializing fragmented packets.
The original protocol id was being overwritten with 0xff(unknown) when the inner_pdu was a RawPDU, even if it was just a fragment of a transport layer PDU. The protocol id is now kept if the packet is fragmented.
This commit is contained in:
@@ -400,8 +400,8 @@ void IP::write_serialization(uint8_t *buffer, uint32_t total_sz, const PDU* pare
|
||||
Internals::pdu_type_to_id<IP>(inner_pdu()->pdu_type())
|
||||
);
|
||||
}
|
||||
protocol(new_flag);
|
||||
//flag(new_flag);
|
||||
if(!is_fragmented() || new_flag != 0xff)
|
||||
protocol(new_flag);
|
||||
}
|
||||
|
||||
#if __FreeBSD__ || defined(__FreeBSD_kernel__)
|
||||
|
||||
Reference in New Issue
Block a user