summaryrefslogtreecommitdiff
path: root/osdep/MacEthernetTapAgent.c
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2019-03-29 12:45:02 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2019-03-29 12:45:02 -0700
commitd77846dcea8db97c9b07d7439fdbf3ee8bdb51b3 (patch)
tree24b4ecf25c5a5223ed0b537451050fe4340ae42f /osdep/MacEthernetTapAgent.c
parent92c811deb7134cf26c306870ba5ed1b6eb29e452 (diff)
downloadinfinitytier-d77846dcea8db97c9b07d7439fdbf3ee8bdb51b3.tar.gz
infinitytier-d77846dcea8db97c9b07d7439fdbf3ee8bdb51b3.zip
Add bigness to buffers to prevent overflow on high traffic (Mac tap).
Diffstat (limited to 'osdep/MacEthernetTapAgent.c')
-rw-r--r--osdep/MacEthernetTapAgent.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/osdep/MacEthernetTapAgent.c b/osdep/MacEthernetTapAgent.c
index ab3068ab..f5edf0a5 100644
--- a/osdep/MacEthernetTapAgent.c
+++ b/osdep/MacEthernetTapAgent.c
@@ -104,8 +104,8 @@
#define P_IFCONFIG "/sbin/ifconfig"
-static unsigned char s_pktReadBuf[262144] __attribute__ ((__aligned__(16)));
-static unsigned char s_stdinReadBuf[262144] __attribute__ ((__aligned__(16)));
+static unsigned char s_pktReadBuf[1048576] __attribute__ ((__aligned__(16)));
+static unsigned char s_stdinReadBuf[1048576] __attribute__ ((__aligned__(16)));
static char s_deviceName[IFNAMSIZ];
static char s_peerDeviceName[IFNAMSIZ];
static int s_bpffd = -1;
@@ -418,6 +418,10 @@ int main(int argc,char **argv)
case ZT_MACETHERNETTAPAGENT_STDIN_CMD_EXIT:
return ZT_MACETHERNETTAPAGENT_EXIT_CODE_SUCCESS;
+
+ default:
+ fprintf(stderr,"E unrecognized message type over pipe from host process: %d (length: %d)\n",(int)msg[0],(int)len);
+ break;
}
}