This commit is contained in:
Jeff Becker 2018-12-15 11:39:14 -05:00
parent 8402e091ed
commit b4517c4931
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -267,10 +267,11 @@ namespace llarp
// all BSDs have packet info // all BSDs have packet info
const ssize_t offset = 4; const ssize_t offset = 4;
// becuase reasons :^) // becuase reasons :^)
if(sz <= offset) if(sz < offset)
sz = 1500; sz = 1500;
ssize_t ret = ::read(fd, buf, sz); ssize_t ret = ::read(fd, buf, sz);
llarp::LogInfo("read ", ret, " of ", sz, " on tun interface");
if(ret > offset && t->recvpkt) if(ret > offset && t->recvpkt)
{ {
buf += offset; buf += offset;