File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -547,8 +547,8 @@ impl RouterKey {
547
547
pub fn flags ( & self ) -> u8 {
548
548
// The two-byte Session field is reused for the Flags byte and one
549
549
// reserved byte (of zeroes). As the value of the Session field is in
550
- // network byte order, we are actually looking at (Reserved, Flags),
551
- // so we want the lower byte here .
550
+ // network byte order, we first convert it, then shift out the lower
551
+ // byte.
552
552
( u16:: from_be ( self . fixed . header . session ) >> 8 ) as u8
553
553
}
554
554
@@ -851,8 +851,8 @@ impl Aspa {
851
851
pub fn flags ( & self ) -> u8 {
852
852
// The two-byte Session field is reused for the Flags byte and one
853
853
// reserved byte (of zeroes). As the value of the Session field is in
854
- // network byte order, we are actually looking at (Reserved, Flags),
855
- // so we want the lower byte here .
854
+ // network byte order, we first convert it, then shift out the lower
855
+ // byte.
856
856
( u16:: from_be ( self . fixed . header . session ) >> 8 ) as u8
857
857
}
858
858
You can’t perform that action at this time.
0 commit comments