Browse Source

Merge remote-tracking branch 'origin/dev' into multipath

Joseph Henry 6 years ago
parent
commit
15e44f0ddd
3 changed files with 11 additions and 2 deletions
  1. 5 0
      node/Multicaster.cpp
  2. 5 1
      osdep/LinuxNetLink.cpp
  3. 1 1
      zerotier-one.spec

+ 5 - 0
node/Multicaster.cpp

@@ -275,6 +275,11 @@ void Multicaster::send(
 				}
 				}
 			}
 			}
 		} else {
 		} else {
+			if (gs.txQueue.size() >= ZT_TX_QUEUE_SIZE) {
+				RR->t->outgoingNetworkFrameDropped(tPtr,network,src,mg.mac(),etherType,0,len,"multicast TX queue is full");
+				return;
+			}
+
 			const unsigned int gatherLimit = (limit - (unsigned int)gs.members.size()) + 1;
 			const unsigned int gatherLimit = (limit - (unsigned int)gs.members.size()) + 1;
 
 
 			if ((gs.members.empty())||((now - gs.lastExplicitGather) >= ZT_MULTICAST_EXPLICIT_GATHER_DELAY)) {
 			if ((gs.members.empty())||((now - gs.lastExplicitGather) >= ZT_MULTICAST_EXPLICIT_GATHER_DELAY)) {

+ 5 - 1
osdep/LinuxNetLink.cpp

@@ -105,7 +105,11 @@ void LinuxNetLink::_setSocketTimeout(int fd, int seconds)
 #define ZT_NL_BUF_SIZE 16384
 #define ZT_NL_BUF_SIZE 16384
 int LinuxNetLink::_doRecv(int fd)
 int LinuxNetLink::_doRecv(int fd)
 {
 {
-	char *const buf = (char *)valloc(ZT_NL_BUF_SIZE);
+	char *buf = nullptr;
+	if (posix_memalign((void **)&buf,16,ZT_NL_BUF_SIZE) != 0) {
+		fprintf(stderr,"malloc failed!\n");
+		::exit(1);
+	}
 	if (!buf) {
 	if (!buf) {
 		fprintf(stderr,"malloc failed!\n");
 		fprintf(stderr,"malloc failed!\n");
 		::exit(1);
 		::exit(1);

+ 1 - 1
zerotier-one.spec

@@ -14,7 +14,7 @@ BuildRequires:  systemd
 BuildRequires:  systemd
 BuildRequires:  systemd
 %endif
 %endif
 
 
-Requires:       iproute
+Requires:       iproute libstdc++
 
 
 %if 0%{?rhel} >= 7
 %if 0%{?rhel} >= 7
 Requires:       systemd
 Requires:       systemd