for peer FNE connections we should never disable network services on ACL NAK (this would result in a condition where the peer FNE would need to be restarted in order to reconnect, which isn't convenient);

pull/85/head
Bryan Biedenkapp 10 months ago
parent 6e589d9665
commit 7d6d4f4134

@ -59,6 +59,7 @@ Network::Network(const std::string& address, uint16_t port, uint16_t localPort,
m_remotePeerId(0U),
m_promiscuousPeer(false),
m_userHandleProtocol(false),
m_neverDisableOnACLNAK(false),
m_peerConnectedCallback(nullptr),
m_peerDisconnectedCallback(nullptr),
m_dmrInCallCallback(nullptr),
@ -701,8 +702,10 @@ void Network::clock(uint32_t ms)
break;
case NET_CONN_NAK_PEER_ACL:
LogError(LOG_NET, "PEER %u master NAK; ACL rejection, network disabled, remotePeerId = %u", m_peerId, rtpHeader.getSSRC());
m_status = NET_STAT_WAITING_LOGIN;
m_enabled = false; // ACL rejection give up stop trying to connect
if (!m_neverDisableOnACLNAK) {
m_status = NET_STAT_WAITING_LOGIN;
m_enabled = false; // ACL rejection give up stop trying to connect
}
break;
case NET_CONN_NAK_GENERAL_FAILURE:

@ -267,6 +267,10 @@ namespace network
* to the defined user packet handler.
*/
bool m_userHandleProtocol;
/**
* @brief Flag indicating this peer will not disable networking services on a master ACL NAK.
*/
bool m_neverDisableOnACLNAK;
/**
* @brief Peer Connected Function Callback.

@ -51,6 +51,9 @@ PeerNetwork::PeerNetwork(const std::string& address, uint16_t port, uint16_t loc
// ignore the source peer ID for packets
m_promiscuousPeer = true;
// never disable peer network services on ACL NAK from master
m_neverDisableOnACLNAK = true;
}
/* Sets the instances of the Peer List lookup tables. */

Loading…
Cancel
Save

Powered by TurnKey Linux.