mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-18 20:47:53 +00:00
Catch all conditions in switch statement, remove trailing whitespaces
This commit is contained in:
parent
1d095e81d9
commit
a15883d49b
@ -2750,46 +2750,8 @@ public:
|
||||
TcpConnection *tc = reinterpret_cast<TcpConnection *>(*uptr);
|
||||
tc->lastReceive = OSUtils::now();
|
||||
switch(tc->type) {
|
||||
|
||||
// TODO: Remove Me
|
||||
// case TcpConnection::TCP_UNCATEGORIZED_INCOMING:
|
||||
// switch(reinterpret_cast<uint8_t *>(data)[0]) {
|
||||
// // HTTP: GET, PUT, POST, HEAD, DELETE
|
||||
// case 'G':
|
||||
// case 'P':
|
||||
// case 'D':
|
||||
// case 'H': {
|
||||
// // This is only allowed from IPs permitted to access the management
|
||||
// // backplane, which is just 127.0.0.1/::1 unless otherwise configured.
|
||||
// bool allow;
|
||||
// {
|
||||
// Mutex::Lock _l(_localConfig_m);
|
||||
// if (_allowManagementFrom.empty()) {
|
||||
// allow = (tc->remoteAddr.ipScope() == InetAddress::IP_SCOPE_LOOPBACK);
|
||||
// } else {
|
||||
// allow = false;
|
||||
// for(std::vector<InetAddress>::const_iterator i(_allowManagementFrom.begin());i!=_allowManagementFrom.end();++i) {
|
||||
// if (i->containsAddress(tc->remoteAddr)) {
|
||||
// allow = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (allow) {
|
||||
// tc->type = TcpConnection::TCP_HTTP_INCOMING;
|
||||
// phyOnTcpData(sock,uptr,data,len);
|
||||
// } else {
|
||||
// _phy.close(sock);
|
||||
// }
|
||||
// } break;
|
||||
|
||||
// // Drop unknown protocols
|
||||
// default:
|
||||
// _phy.close(sock);
|
||||
// break;
|
||||
// }
|
||||
// return;
|
||||
case TcpConnection::TCP_UNCATEGORIZED_INCOMING:
|
||||
return;
|
||||
|
||||
case TcpConnection::TCP_HTTP_INCOMING:
|
||||
case TcpConnection::TCP_HTTP_OUTGOING:
|
||||
|
Loading…
Reference in New Issue
Block a user