|
Line 0
Link Here
|
|
|
1 |
--- ../shared_udp.c Tue Jul 6 17:42:26 1999 |
| 2 |
+++ ../shared_udp.c Tue Jul 20 23:54:38 1999 |
| 3 |
@@ -259,7 +259,16 @@ |
| 4 |
gNextPort++; |
| 5 |
if (gNextPort > gUDPPortMax) |
| 6 |
gNextPort = gUDPPortMin; |
| 7 |
- } while (bind_socket_to_address(skt1, fromIP, port1 = gNextPort++, false) != 0); |
| 8 |
+ } while (bind_socket_to_address(skt1, INADDR_ANY, port1 = gNextPort++, false) != 0); |
| 9 |
+ |
| 10 |
+// i've changed the previous bind and the next one below to bind to any |
| 11 |
+// IP number rather than using 'fromIP'. 'fromIP' is obtained from gProxyIP |
| 12 |
+// which is in turn obtained from 'get_local_ip_address'. this function |
| 13 |
+// gets the current hostname and then resolves that into an address. however, |
| 14 |
+// since a proxy server runs on a bridging system with multiple IP addresses, |
| 15 |
+// this is as likely as not to return the wrong IP address, which results in |
| 16 |
+// the proxy missing all of the traffic from the server. not binding to a |
| 17 |
+// specific address is cheap but gets a result. |
| 18 |
|
| 19 |
if (withSib) { |
| 20 |
retry_rtcp: |
| 21 |
@@ -271,7 +280,7 @@ |
| 22 |
else |
| 23 |
goto bail_error; |
| 24 |
} |
| 25 |
- if (bind_socket_to_address(skt2, fromIP, port2 = gNextPort++, false) != 0) { |
| 26 |
+ if (bind_socket_to_address(skt2, INADDR_ANY, port2 = gNextPort++, false) != 0) { |
| 27 |
close_socket(skt1); |
| 28 |
close_socket(skt2); |
| 29 |
skt1 = INVALID_SOCKET; |