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:
Nils Ohlmeier [:drno] 2016-09-22 17:56:29 -07:00
Родитель c09374be30
Коммит 9ddb815b69
3 изменённых файлов: 42 добавлений и 42 удалений

Просмотреть файл

@ -285,7 +285,7 @@ static int nr_socket_buffered_stun_recvfrom(void *obj,void * restrict buf,
ABORT(R_FAILED); ABORT(R_FAILED);
} }
reread: while (sock->bytes_needed) {
/* Read all the expected bytes */ /* Read all the expected bytes */
assert(sock->bytes_needed <= sock->buffer_size - sock->bytes_read); assert(sock->bytes_needed <= sock->buffer_size - sock->bytes_read);
@ -325,11 +325,10 @@ reread:
if ((sock->buffer_size - sock->bytes_read) < remaining_length) if ((sock->buffer_size - sock->bytes_read) < remaining_length)
ABORT(R_BAD_DATA); ABORT(R_BAD_DATA);
sock->read_state = NR_ICE_SOCKET_READ_HDR;
/* Set ourselves up to read the rest of the data */ /* Set ourselves up to read the rest of the data */
sock->bytes_needed = remaining_length; sock->bytes_needed = remaining_length;
}
sock->read_state = NR_ICE_SOCKET_READ_HDR;
goto reread;
} }
assert(skip_hdr_size <= sock->bytes_read); 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) { switch (mode) {
default: default:
req->header.magic_cookie = NR_STUN_MAGIC_COOKIE;
if ((r=nr_stun_message_add_fingerprint_attribute(req))) if ((r=nr_stun_message_add_fingerprint_attribute(req)))
ABORT(r); ABORT(r);
/* fall through */
case NR_STUN_MODE_STUN_NO_AUTH:
req->header.magic_cookie = NR_STUN_MAGIC_COOKIE;
break; break;
#ifdef USE_STUND_0_96 #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; int r,_status;
nr_stun_message *req = 0; 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); ABORT(r);
*msg = req; *msg = req;

Просмотреть файл

@ -40,6 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef USE_STUND_0_96 #ifdef USE_STUND_0_96
#define NR_STUN_MODE_STUND_0_96 2 /* backwards compatibility mode */ #define NR_STUN_MODE_STUND_0_96 2 /* backwards compatibility mode */
#endif /* USE_STUND_0_96 */ #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); 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_ { typedef struct nr_stun_client_stun_binding_request_params_ {