File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
holo-ospf/src/ospfv3/packet Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -371,9 +371,8 @@ impl Session {
371371 {
372372 // (Re)start Tx interval.
373373 let sockaddr = self . state . sockaddr . unwrap ( ) ;
374- let task = tasks:: udp_tx_interval (
375- self , interval, socket_tx, sockaddr
376- ) ;
374+ let task =
375+ tasks:: udp_tx_interval ( self , interval, socket_tx, sockaddr) ;
377376 self . state . tx_interval = Some ( task) ;
378377 } else {
379378 // Stop Tx interval.
Original file line number Diff line number Diff line change @@ -798,7 +798,8 @@ impl PacketVersion<Self> for Ospfv3 {
798798 // structures, which would require the introduction of locking
799799 // primitives.
800800 if let Some ( options) = options
801- && auth. is_some ( ) != options. contains ( Options :: AT ) {
801+ && auth. is_some ( ) != options. contains ( Options :: AT )
802+ {
802803 return Err ( DecodeError :: AuthTypeMismatch ) ;
803804 }
804805 if auth. is_none ( ) {
@@ -810,14 +811,15 @@ impl PacketVersion<Self> for Ospfv3 {
810811
811812 // Ignore optional LLS block (only present in Hello and Database
812813 // Description packets).
813- if let Some ( options) = & options && options. contains ( Options :: L ) {
814+ if let Some ( options) = & options
815+ && options. contains ( Options :: L )
816+ {
814817 if buf. remaining ( ) < LLS_HDR_SIZE as usize {
815818 return Err ( DecodeError :: InvalidLength ( buf. len ( ) as u16 ) ) ;
816819 }
817820 let _lls_cksum = buf. get_u16 ( ) ;
818821 let lls_block_len = buf. get_u16 ( ) ;
819- if buf. remaining ( ) < ( lls_block_len * 4 - LLS_HDR_SIZE ) as usize
820- {
822+ if buf. remaining ( ) < ( lls_block_len * 4 - LLS_HDR_SIZE ) as usize {
821823 return Err ( DecodeError :: InvalidLength ( buf. len ( ) as u16 ) ) ;
822824 }
823825 buf. advance ( lls_block_len as usize ) ;
You can’t perform that action at this time.
0 commit comments