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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user