Commit 42c5ed18 authored by nanamicat's avatar nanamicat

fix

parent 05816965
......@@ -19,7 +19,7 @@ void inbound(int raw, int tun) {
socklen_t addrlen;
size_t nread;
while ((nread = recvfrom(raw, buf, sizeof(buf), 0, (sockaddr *) &addr, &addrlen)) >= 0) {
std::cout << nread << std::endl;
std::cout << "recv " << nread << " bytes from" << inet_ntoa(addr.sin_addr) << std::endl;
if (write(tun, buf, nread) < 0) {
perror("inbound write");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment