[Freeswitch-svn] [commit] r9123 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Mon Jul 21 12:48:05 EDT 2008


Author: anthm
Date: Mon Jul 21 12:48:05 2008
New Revision: 9123

Modified:
   freeswitch/trunk/src/switch_stun.c

Log:
update

Modified: freeswitch/trunk/src/switch_stun.c
==============================================================================
--- freeswitch/trunk/src/switch_stun.c	(original)
+++ freeswitch/trunk/src/switch_stun.c	Mon Jul 21 12:48:05 2008
@@ -493,6 +493,10 @@
 	if (funny) {
 		packet = (switch_stun_packet_t *) buf;
 		bytes += 4;
+		buf[bytes++] = 0;
+		buf[bytes++] = 0;
+		buf[bytes++] = 0;
+		buf[bytes++] = 0;
 	}
 	
 	switch_socket_sendto(sock, remote_addr, 0, (void *) packet, &bytes);
@@ -534,6 +538,10 @@
 		switch (attr->type) {
 		case SWITCH_STUN_ATTR_MAPPED_ADDRESS:
 			if (attr->type) {
+				if(funny)
+				{
+					((switch_stun_ip_t *) attr->value)->address ^= ntohl(0xabcdabcd);
+				}
 				switch_stun_packet_attribute_get_mapped_address(attr, rip, &rport);
 			}
 			break;



More information about the Freeswitch-svn mailing list