server: do not allow a client to control a session created with a different IP

This commit is contained in:
aler9
2021-09-23 19:52:57 +02:00
parent 0454e5407f
commit 239b71d975
9 changed files with 42 additions and 41 deletions

View File

@@ -258,12 +258,12 @@ func (e ErrServerPathHasChanged) Error() string {
return fmt.Sprintf("path has changed, was '%s', now is '%s'", e.Prev, e.Cur)
}
// ErrServerCannotSetupFromDifferentIPs is an error that can be returned by a server.
type ErrServerCannotSetupFromDifferentIPs struct{}
// ErrServerCannotUseSessionCreatedByOtherIP is an error that can be returned by a server.
type ErrServerCannotUseSessionCreatedByOtherIP struct{}
// Error implements the error interface.
func (e ErrServerCannotSetupFromDifferentIPs) Error() string {
return "cannot setup tracks from different IPs"
func (e ErrServerCannotUseSessionCreatedByOtherIP) Error() string {
return "cannot use a session created with a different IP"
}
// ErrServerUDPPortsAlreadyInUse is an error that can be returned by a server.