Browse Source

fix stun xor port response

Change-Id: Ibc1fae020abff0b94c473620f9c27f34827d9769
changes/96/4596/1
Richard Fuchs 10 years ago
parent
commit
27d18e2be3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      daemon/stun.c

+ 1
- 1
daemon/stun.c View File

@ -467,7 +467,7 @@ static int stun_binding_success(struct stream_fd *sfd, struct header *req, struc
output_init(&mh, iov, &hdr, STUN_BINDING_SUCCESS_RESPONSE, req->transaction);
software(&mh, &sw);
xma.port = htons(sin->port) ^ (STUN_COOKIE >> 16);
xma.port = htons(sin->port ^ (STUN_COOKIE >> 16));
if (sin->address.family->af == AF_INET) {
xma.family = htons(0x01);
xma.address[0] = sin->address.u.ipv4.s_addr ^ htonl(STUN_COOKIE);


Loading…
Cancel
Save