TT#105000 don't send STUN response in response to responses

Change-Id: Ia45f96731a9b598c5e757848b5a70a3153c59266
pull/1134/head
Richard Fuchs 5 years ago
parent 6e519047df
commit 7c3d2e016a

@ -630,11 +630,13 @@ int stun(const str *b, struct stream_fd *sfd, const endpoint_t *sin) {
bad_req:
ilog(LOG_NOTICE | LOG_FLAG_LIMIT, "Received invalid STUN packet" SLF ": %s", SLP, err);
stun_error(sfd, sin, req, 400, "Bad request");
if (class == STUN_CLASS_REQUEST)
stun_error(sfd, sin, req, 400, "Bad request");
return 0;
unauth:
ilog(LOG_NOTICE | LOG_FLAG_LIMIT, "STUN authentication mismatch" SLF, SLP);
stun_error(sfd, sin, req, 401, "Unauthorized");
if (class == STUN_CLASS_REQUEST)
stun_error(sfd, sin, req, 401, "Unauthorized");
return 0;
ignore:
ilog(LOG_NOTICE | LOG_FLAG_LIMIT, "Not handling potential STUN packet" SLF ": %s", SLP, err);

Loading…
Cancel
Save