shithub: riscv

Download patch

ref: de349cf9b06c155a89675e2b453a518e43808e81
parent: 2ab042f11e5848089b343cc565acb65d4a5bc64a
author: cinap_lenrek <[email protected]>
date: Fri Dec 26 04:11:04 EST 2014

socksd: dont use myipaddr() for announcing address

--- a/sys/src/cmd/ip/socksd.c
+++ b/sys/src/cmd/ip/socksd.c
@@ -299,15 +299,11 @@
 		alarm(0);
 		break;
 	case 0x02:	/* BIND */
-		if(myipaddr(buf, outside) < 0)
-			break;
-		snprint(addr, sizeof(addr), "%s/tcp!%I!0", outside, buf);
+		snprint(addr, sizeof(addr), "%s/tcp!*!0", outside);
 		fd = announce(addr, dir);
 		break;
 	case 0x03:	/* UDP */
-		if(myipaddr(buf, inside) < 0)
-			break;
-		snprint(addr, sizeof(addr), "%s/udp!%I!0", inside, buf);
+		snprint(addr, sizeof(addr), "%s/udp!*!0", inside);
 		fd = announce(addr, dir);
 		break;
 	}