mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-26 17:03:43 +02:00
Controller fix.
This commit is contained in:
parent
57badb6e56
commit
312a14c593
2 changed files with 2 additions and 6 deletions
|
@ -181,11 +181,7 @@ impl Controller {
|
||||||
packet.append_u16(config_data.len() as u16)?;
|
packet.append_u16(config_data.len() as u16)?;
|
||||||
packet.append_bytes(config_data.as_slice())?;
|
packet.append_bytes(config_data.as_slice())?;
|
||||||
|
|
||||||
// NOTE: V1 supports a bunch of other things like chunking but it was never truly used and is optional.
|
// TODO: for V1 we may need to introduce use of the chunking mechanism for large configs.
|
||||||
// Omit it here as it adds overhead and requires an extra signature we don't need since the other side
|
|
||||||
// knows this packet is coming directly from the controller. This stuff was originally designed to support
|
|
||||||
// a scatter-gather method of config distribution that was never implemented. V2 will just KISS and do
|
|
||||||
// controller clustering instead if we need scalability or more fault tolerance.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let new_payload_len = protocol::compress(&mut packet.as_bytes_mut()[payload_start..]);
|
let new_payload_len = protocol::compress(&mut packet.as_bytes_mut()[payload_start..]);
|
||||||
|
|
|
@ -57,7 +57,7 @@ impl MulticastAuthority {
|
||||||
) -> PacketHandlerResult {
|
) -> PacketHandlerResult {
|
||||||
let mut subscriptions = RMaybeWLockGuard::new_read(&self.subscriptions);
|
let mut subscriptions = RMaybeWLockGuard::new_read(&self.subscriptions);
|
||||||
|
|
||||||
while payload.len() >= (8 + 6 + 4) {
|
while (cursor + 8 + 6 + 4) <= payload.len() {
|
||||||
let network_id = NetworkId::from_bytes_fixed(payload.read_bytes_fixed(&mut cursor).unwrap());
|
let network_id = NetworkId::from_bytes_fixed(payload.read_bytes_fixed(&mut cursor).unwrap());
|
||||||
if let Some(network_id) = network_id {
|
if let Some(network_id) = network_id {
|
||||||
let mac = MAC::from_bytes_fixed(payload.read_bytes_fixed(&mut cursor).unwrap());
|
let mac = MAC::from_bytes_fixed(payload.read_bytes_fixed(&mut cursor).unwrap());
|
||||||
|
|
Loading…
Add table
Reference in a new issue