Browse Source

bug fix: use helper sock_recv_packet

Eugene Yakubovich 10 years ago
parent
commit
d35d41a60d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      udp/proxy.c

+ 1 - 1
udp/proxy.c

@@ -319,7 +319,7 @@ static void tun_to_udp(int tun, int sock, char *buf, size_t buflen) {
 static void udp_to_tun(int sock, int tun, char *buf, size_t buflen) {
 	struct iphdr *iph;
 
-	ssize_t pktlen = recv(sock, buf, buflen, 0);
+	ssize_t pktlen = sock_recv_packet(sock, buf, buflen);
 	if( pktlen < 0 ) {
 		return;
 	}