mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
1fb00f1396
Changed - Connection identifier is now included in the error log if we can't forward a - seqno request. - Garbage collection time for source entries has been increased from 5 to 30 minutes - for now. - The router implementation has been changed to use regular locks instead of an - always readable concurrency primitive for all but the actual routing table. This - should reduce the memory consumption a bit. - Public key and shared secret for a destination are now saved on the router, instead - of maintaining a separate mapping for them. This slightly reduces memory consumption - of the router, and ensures stale data is properly cleaned up when all routes to - a subnet are removed. - Hello packets now set the interval in which the next Hello will be sent properly - in centiseconds. - IHU packets now set the interval properly in centiseconds. - IHU packets now set an RX cost. For now this is the link cost, in the future - this will be set properly. - Route expiration time is now calculated from the interval received in updates. - Ip address derivation from public keys now uses the blake3 hash algorithm. Fixed - Don't try to forward seqno requests to a peer if we know its connection is dead.
58 lines
1.5 KiB
Nix
58 lines
1.5 KiB
Nix
import ../make-test-python.nix ({ lib, ... }: let
|
|
peer1-ip = "538:f40f:1c51:9bd9:9569:d3f6:d0a1:b2df";
|
|
peer2-ip = "5b6:6776:fee0:c1f3:db00:b6a8:d013:d38f";
|
|
in
|
|
{
|
|
name = "mycelium";
|
|
meta.maintainers = with lib.maintainers; [ lassulus ];
|
|
|
|
nodes = {
|
|
|
|
peer1 = { config, pkgs, ... }: {
|
|
virtualisation.vlans = [ 1 ];
|
|
networking.interfaces.eth1.ipv4.addresses = [{
|
|
address = "192.168.1.11";
|
|
prefixLength = 24;
|
|
}];
|
|
|
|
services.mycelium = {
|
|
enable = true;
|
|
addHostedPublicNodes = false;
|
|
openFirewall = true;
|
|
keyFile = ./peer1.key;
|
|
peers = [
|
|
"quic://192.168.1.12:9651"
|
|
"tcp://192.168.1.12:9651"
|
|
];
|
|
};
|
|
};
|
|
|
|
peer2 = { config, pkgs, ... }: {
|
|
virtualisation.vlans = [ 1 ];
|
|
networking.interfaces.eth1.ipv4.addresses = [{
|
|
address = "192.168.1.12";
|
|
prefixLength = 24;
|
|
}];
|
|
|
|
services.mycelium = {
|
|
enable = true;
|
|
addHostedPublicNodes = false;
|
|
openFirewall = true;
|
|
keyFile = ./peer2.key;
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
|
|
peer1.wait_for_unit("network-online.target")
|
|
peer2.wait_for_unit("network-online.target")
|
|
peer1.wait_for_unit("mycelium.service")
|
|
peer2.wait_for_unit("mycelium.service")
|
|
|
|
peer1.succeed("ping -c5 ${peer2-ip}")
|
|
peer2.succeed("ping -c5 ${peer1-ip}")
|
|
'';
|
|
})
|