1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Use endian independent way of setting IP fragment offset and flags

This commit is contained in:
Matias Fontanini
2015-12-07 22:11:28 -08:00
parent 3e23bcc73c
commit a35b086d12
3 changed files with 7 additions and 4 deletions

View File

@@ -329,7 +329,7 @@ namespace Tins {
* \return The IP flags field
*/
Flags flags() const {
return static_cast<Flags>((_ip.frag_off & 0xe0) >> 5);
return static_cast<Flags>(Endian::be_to_host(_ip.frag_off) >> 13);
}
/**