Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ func (a *Agent) handleInbound(msg *stun.Message, local Candidate, remote net.Add

if msg.Type.Class == stun.ClassSuccessResponse { //nolint:nestif
if err := stun.MessageIntegrity([]byte(a.remotePwd)).Check(msg); err != nil {
a.log.Warnf("Discard message from (%s), %v", remote, err)
a.log.Warnf("Discard success response with broken integrity from (%s), %v", remote, err)

return
}
Expand All @@ -1178,11 +1178,11 @@ func (a *Agent) handleInbound(msg *stun.Message, local Candidate, remote net.Add
)

if err := stunx.AssertUsername(msg, a.localUfrag+":"+a.remoteUfrag); err != nil {
a.log.Warnf("Discard message from (%s), %v", remote, err)
a.log.Warnf("Discard request with wrong username from (%s), %v", remote, err)

return
} else if err := stun.MessageIntegrity([]byte(a.localPwd)).Check(msg); err != nil {
a.log.Warnf("Discard message from (%s), %v", remote, err)
a.log.Warnf("Discard request with broken integrity from (%s), %v", remote, err)

return
}
Expand Down
2 changes: 1 addition & 1 deletion selection.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (s *controllingSelector) HandleBindingRequest(message *stun.Message, local,
func (s *controllingSelector) HandleSuccessResponse(m *stun.Message, local, remote Candidate, remoteAddr net.Addr) {
ok, pendingRequest, rtt := s.agent.handleInboundBindingSuccess(m.TransactionID)
if !ok {
s.log.Warnf("Discard message from (%s), unknown TransactionID 0x%x", remote, m.TransactionID)
s.log.Warnf("Discard success response from (%s), unknown TransactionID 0x%x", remote, m.TransactionID)

return
}
Expand Down
Loading