1
0
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:
Matias Fontanini
2013-12-04 10:56:48 -03:00
parent 83dc8819b6
commit 2ddec368c3
3 changed files with 34 additions and 3 deletions

View File

@@ -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__)