Skip to content

Commit

Permalink
fix isSCMPInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiSubira committed Nov 10, 2023
1 parent c6a9ec6 commit 6cfe3f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dispatcher/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ func (s *Server) Serve() error {
continue
}

// If the incoming message is SCMP Informational message (Echo or Traceroute)
// If the outgoing message is SCMP Informational message (Echo or Traceroute)
// the dispatcher has already processed the response, and the nextHop address
// belongs to the BR.
isSCMPinfo := s.scmpLayer.TypeCode.Type() == slayers.SCMPTypeTracerouteRequest ||
s.scmpLayer.TypeCode.Type() == slayers.SCMPTypeEchoRequest
isSCMPinfo := s.scmpLayer.TypeCode.Type() == slayers.SCMPTypeTracerouteReply ||
s.scmpLayer.TypeCode.Type() == slayers.SCMPTypeEchoReply
if isSCMPinfo || s.validateNextHopAddr(*nextHopAddr, s.oobuf[:nn]) {
m, err := s.conn.WriteToUDPAddrPort(s.outBuffer.Bytes(), *nextHopAddr)
if err != nil || m != len(s.outBuffer.Bytes()) {
Expand Down

0 comments on commit 6cfe3f4

Please sign in to comment.