зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1304920: remove fingerprint attribute from plain binding requests. r=bwc
MozReview-Commit-ID: KpqQfHzv7zn --HG-- extra : rebase_source : 976af858b54a6ddda23b19310352359659260b71
This commit is contained in:
Родитель
c09374be30
Коммит
9ddb815b69
|
@ -285,7 +285,7 @@ static int nr_socket_buffered_stun_recvfrom(void *obj,void * restrict buf,
|
|||
ABORT(R_FAILED);
|
||||
}
|
||||
|
||||
reread:
|
||||
while (sock->bytes_needed) {
|
||||
/* Read all the expected bytes */
|
||||
assert(sock->bytes_needed <= sock->buffer_size - sock->bytes_read);
|
||||
|
||||
|
@ -325,11 +325,10 @@ reread:
|
|||
if ((sock->buffer_size - sock->bytes_read) < remaining_length)
|
||||
ABORT(R_BAD_DATA);
|
||||
|
||||
sock->read_state = NR_ICE_SOCKET_READ_HDR;
|
||||
/* Set ourselves up to read the rest of the data */
|
||||
sock->bytes_needed = remaining_length;
|
||||
|
||||
sock->read_state = NR_ICE_SOCKET_READ_HDR;
|
||||
goto reread;
|
||||
}
|
||||
}
|
||||
|
||||
assert(skip_hdr_size <= sock->bytes_read);
|
||||
|
|
|
@ -75,11 +75,11 @@ nr_stun_form_request_or_indication(int mode, int msg_type, nr_stun_message **msg
|
|||
|
||||
switch (mode) {
|
||||
default:
|
||||
req->header.magic_cookie = NR_STUN_MAGIC_COOKIE;
|
||||
|
||||
if ((r=nr_stun_message_add_fingerprint_attribute(req)))
|
||||
ABORT(r);
|
||||
|
||||
/* fall through */
|
||||
case NR_STUN_MODE_STUN_NO_AUTH:
|
||||
req->header.magic_cookie = NR_STUN_MAGIC_COOKIE;
|
||||
break;
|
||||
|
||||
#ifdef USE_STUND_0_96
|
||||
|
@ -164,7 +164,7 @@ nr_stun_build_req_no_auth(nr_stun_client_stun_binding_request_params *params, nr
|
|||
int r,_status;
|
||||
nr_stun_message *req = 0;
|
||||
|
||||
if ((r=nr_stun_form_request_or_indication(NR_STUN_MODE_STUN, NR_STUN_MSG_BINDING_REQUEST, &req)))
|
||||
if ((r=nr_stun_form_request_or_indication(NR_STUN_MODE_STUN_NO_AUTH, NR_STUN_MSG_BINDING_REQUEST, &req)))
|
||||
ABORT(r);
|
||||
|
||||
*msg = req;
|
||||
|
|
|
@ -40,6 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifdef USE_STUND_0_96
|
||||
#define NR_STUN_MODE_STUND_0_96 2 /* backwards compatibility mode */
|
||||
#endif /* USE_STUND_0_96 */
|
||||
#define NR_STUN_MODE_STUN_NO_AUTH 3
|
||||
int nr_stun_form_request_or_indication(int mode, int msg_type, nr_stun_message **msg);
|
||||
|
||||
typedef struct nr_stun_client_stun_binding_request_params_ {
|
||||
|
|
Загрузка…
Ссылка в новой задаче