From 27d18e2be35986747fd238581efd40a54280ac7a Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 11 Feb 2016 15:29:32 -0500 Subject: [PATCH] fix stun xor port response Change-Id: Ibc1fae020abff0b94c473620f9c27f34827d9769 --- daemon/stun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/stun.c b/daemon/stun.c index 61f1d3748..2b52746cc 100644 --- a/daemon/stun.c +++ b/daemon/stun.c @@ -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);