@@ -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;
}