diff --git a/src/rust/lqos_sys/src/bifrost_maps.rs b/src/rust/lqos_sys/src/bifrost_maps.rs index 68de6ccb..5a296907 100644 --- a/src/rust/lqos_sys/src/bifrost_maps.rs +++ b/src/rust/lqos_sys/src/bifrost_maps.rs @@ -84,7 +84,7 @@ pub(crate) fn map_single_interface_mode( // VLANs - Internet let mut key: u32 = (interface_name_to_index(&interface)? << 16) | internet_vlan; - let mut val = BifrostVlan { redirect_to: mapping.redirect_to }; + let mut val = BifrostVlan { redirect_to: lan_vlan }; vlan_map.insert(&mut key, &mut val)?; info!( "Mapped bifrost VLAN: {}:{} => {}", @@ -94,7 +94,7 @@ pub(crate) fn map_single_interface_mode( // VLANs - LAN let mut key: u32 = (interface_name_to_index(&interface)? << 16) | lan_vlan; - let mut val = BifrostVlan { redirect_to: mapping.redirect_to }; + let mut val = BifrostVlan { redirect_to: internet_vlan }; vlan_map.insert(&mut key, &mut val)?; info!( "Mapped bifrost VLAN: {}:{} => {}", -- knotmirror 0.0.1 From 43befe6c9c705e82add08e7793e762c8e55feb43 Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Tue, 5 Mar 2024 09:08:41 -0600 Subject: [PATCH 02/29] Enable binpacking for on-a-stick mode. --- src/LibreQoS.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LibreQoS.py b/src/LibreQoS.py index e96d5dcc..bc05b108 100755 --- a/src/LibreQoS.py +++ b/src/LibreQoS.py @@ -736,7 +736,7 @@ def refreshShapers(): # If we're in binpacking mode, we need to sort the network structure a bit bins = [] - if use_bin_packing_to_balance_cpu() and not on_a_stick(): + if use_bin_packing_to_balance_cpu(): print("BinPacking is enabled, so we're going to sort your network.") cpuBin = {} weights = get_tree_weights() -- knotmirror 0.0.1 From a4f08f2bd5f22e1aa513f3b8ffb4e289a992d731 Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Thu, 21 Mar 2024 08:39:44 -0500 Subject: [PATCH 03/29] Add a flow map icon to the main page in lqos_node_manager. --- src/rust/lqos_node_manager/static/main.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rust/lqos_node_manager/static/main.html b/src/rust/lqos_node_manager/static/main.html index ef72af31..e38c1407 100644 --- a/src/rust/lqos_node_manager/static/main.html +++ b/src/rust/lqos_node_manager/static/main.html @@ -150,6 +150,7 @@ + Flow Map
-- knotmirror 0.0.1 From 2cae280d3837ef0006c4bd6c468d4dca58c47816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Thu, 21 Mar 2024 07:54:25 -0600 Subject: [PATCH 04/29] Update lqos.example --- src/lqos.example | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lqos.example b/src/lqos.example index deb197de..36f40117 100644 --- a/src/lqos.example +++ b/src/lqos.example @@ -53,6 +53,15 @@ uisp_reporting_interval_seconds = 300 ignore_subnets = [] allow_subnets = [ "172.16.0.0/12", "10.0.0.0/8", "100.64.0.0/16", "192.168.0.0/16" ] +[flows] +# You need to change the netflow_port, netflow_ip to your receiver (and uncomment them), and netflow_version must be either 5 (IPv4 only, faster) or 9 (IPv6 and 4, much larger packets) +flow_timeout_seconds = 30 +netflow_enabled = false +# netflow_port = 2055 +# netflow_ip = "127.0.0.1" +# netflow_version = 9 +do_not_track_subnets = [ "192.168.66.0/24" ] + [integration_common] circuit_name_as_address = false always_overwrite_network_json = false @@ -99,4 +108,4 @@ enable_influxdb = false url = "http://localhost:8086" org = "libreqos" bucket = "Your ISP Name Here" -token = "" \ No newline at end of file +token = "" -- knotmirror 0.0.1 From 086eaf051004dc2029814ced4b5ee71bc9820125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Sun, 24 Mar 2024 11:45:30 -0600 Subject: [PATCH 05/29] Allow Suspension UISP Flat Network --- src/integrationUISP.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/integrationUISP.py b/src/integrationUISP.py index 4d644509..501cc9c4 100644 --- a/src/integrationUISP.py +++ b/src/integrationUISP.py @@ -45,7 +45,16 @@ def buildFlatGraph(): if (site['qos']['downloadSpeed']) and (site['qos']['uploadSpeed']): download = int(round(site['qos']['downloadSpeed']/1000000)) upload = int(round(site['qos']['uploadSpeed']/1000000)) - + if site['identification'] is not None and site['identification']['suspended'] is not None and site['identification']['suspended'] == True: + if uisp_suspended_strategy() == "ignore": + print("WARNING: Site " + name + " is suspended") + continue + if uisp_suspended_strategy() == "slow": + print("WARNING: Site " + name + " is suspended") + download = 1 + upload = 1 + if site['identification']['status'] == "disconnected": + print("WARNING: Site " + name + " is disconnected") node = NetworkNode(id=id, displayName=name, type=NodeType.client, download=download, upload=upload, address=address, customerName=customerName) net.addRawNode(node) for device in devices: -- knotmirror 0.0.1 From 9ba992db5f1c12b9661bccf8bd7b4779f0d9d174 Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Tue, 9 Apr 2024 14:44:39 -0500 Subject: [PATCH 06/29] Update package versions in Rust, to remove some more theoretical CVEs. --- src/rust/Cargo.lock | 154 ++++++++++++++++++++++---------------------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock index 41853791..19e331ef 100644 --- a/src/rust/Cargo.lock +++ b/src/rust/Cargo.lock @@ -154,9 +154,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.78" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", @@ -180,9 +180,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "axum" @@ -235,9 +235,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -339,9 +339,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" @@ -357,9 +357,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cassowary" @@ -375,9 +375,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.90" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41" [[package]] name = "cexpr" @@ -413,9 +413,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.35" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" dependencies = [ "android-tzdata", "iana-time-zone", @@ -449,7 +449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half 2.4.0", + "half 2.4.1", ] [[package]] @@ -476,9 +476,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.3" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", "clap_derive", @@ -498,9 +498,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.3" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -532,9 +532,9 @@ dependencies = [ [[package]] name = "cookie" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd91cf61412820176e137621345ee43b3f4423e589e7ae4e50d601d93e35ef8" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" dependencies = [ "percent-encoding", "time", @@ -926,9 +926,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fiat-crypto" @@ -1125,9 +1125,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "libc", @@ -1148,9 +1148,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -1173,9 +1173,9 @@ checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" [[package]] name = "half" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ "cfg-if", "crunchy", @@ -1326,9 +1326,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", @@ -1337,9 +1337,9 @@ dependencies = [ [[package]] name = "indoc" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "inlinable_string" @@ -1435,9 +1435,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jemalloc-sys" @@ -1502,9 +1502,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libbpf-sys" -version = "1.3.0+v1.3.0" +version = "1.4.0+v1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e68987fe8f2dd7b76930f800a4e5b958c766171fc3a7c33dd67c06a0f1e801" +checksum = "a4ee5f6d35341ad5d492fd92466c45ff11d6e8104ffa8208f62450875c93e258" dependencies = [ "cc", "nix 0.27.1", @@ -1862,15 +1862,15 @@ checksum = "df39d232f5c40b0891c10216992c2f250c054105cb1e56f0fc9032db6203ecc1" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memoffset" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] @@ -1985,9 +1985,9 @@ dependencies = [ [[package]] name = "netlink-sys" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" +checksum = "416060d346fbaf1f23f9512963e3e878f1a78e707cb699ba9215761754244307" dependencies = [ "bytes", "libc", @@ -2142,9 +2142,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.101" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -2238,9 +2238,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2256,9 +2256,9 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platforms" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" [[package]] name = "plotters" @@ -2308,9 +2308,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", "syn", @@ -2442,9 +2442,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -2491,14 +2491,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -2518,7 +2518,7 @@ checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -2529,9 +2529,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" @@ -2738,9 +2738,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] name = "ryu" @@ -2789,9 +2789,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -2802,9 +2802,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -2848,9 +2848,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", @@ -2955,9 +2955,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -3035,9 +3035,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" @@ -3047,9 +3047,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "2.0.53" +version = "2.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" dependencies = [ "proc-macro2", "quote", @@ -3064,9 +3064,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sysinfo" -version = "0.30.7" +version = "0.30.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c385888ef380a852a16209afc8cfad22795dd8873d69c9a14d2e2088f118d18" +checksum = "e9a84fe4cfc513b41cb2596b624e561ec9e7e1c4b46328e496ed56a53514ef2a" dependencies = [ "cfg-if", "core-foundation-sys", @@ -3204,9 +3204,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", -- knotmirror 0.0.1 From 3243d9c1f3bd51d577e521af222fa7fccee48fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Tue, 16 Apr 2024 14:11:55 -0600 Subject: [PATCH 07/29] Update integrationUISP.py --- src/integrationUISP.py | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/src/integrationUISP.py b/src/integrationUISP.py index 501cc9c4..db579239 100644 --- a/src/integrationUISP.py +++ b/src/integrationUISP.py @@ -315,27 +315,36 @@ def findNodesBranchedOffPtMP(siteList, dataLinks, sites, rootSite, foundAirFiber if isTrueSite: if site['parent'] is not None: parent = site['parent'] + # Check how many links connect site to parent + # If only one link conencts them, we can then consdier if it's a node off PtMP + howManyLinksToParent = 0 for link in dataLinks: if (link['to']['site'] is not None) and (link['to']['site']['identification'] is not None): if ('identification' in link['to']['site']) and (link['to']['site']['identification'] is not None) and link['from'] is not None and link['from']['site'] is not None and link['from']['site']['identification'] is not None: - # Respect parent defined by topology and overrides if link['from']['site']['identification']['id'] == trueParent: if link['to']['site']['identification']['id'] == id: - if (link['from']['device']['overview']['wirelessMode'] == 'ap-ptmp') or (link['from']['device']['overview']['wirelessMode'] == 'ap'): - if 'overview' in link['to']['device']: - if ('downlinkCapacity' in link['to']['device']['overview']) and ('uplinkCapacity' in link['to']['device']['overview']): - if (link['to']['device']['overview']['downlinkCapacity'] is not None) and (link['to']['device']['overview']['uplinkCapacity'] is not None): - apID = link['from']['device']['identification']['id'] - # Capacity of the PtMP client radio feeding the PoP will be used as the site bandwidth limit - download = int(round(link['to']['device']['overview']['downlinkCapacity']/1000000)) - upload = int(round(link['to']['device']['overview']['uplinkCapacity']/1000000)) - nodeOffPtMP[id] = {'download': download, - 'upload': upload, - parent: apID - } - if use_ptmp_as_parent(): - site['parent'] = apID - print('Site ' + name + ' will use PtMP AP as parent.') + howManyLinksToParent += 1 + if howManyLinksToParent == 1: + for link in dataLinks: + if (link['to']['site'] is not None) and (link['to']['site']['identification'] is not None): + if ('identification' in link['to']['site']) and (link['to']['site']['identification'] is not None) and link['from'] is not None and link['from']['site'] is not None and link['from']['site']['identification'] is not None: + # Respect parent defined by topology and overrides + if link['from']['site']['identification']['id'] == trueParent: + if link['to']['site']['identification']['id'] == id: + if (link['from']['device']['overview']['wirelessMode'] == 'ap-ptmp') or (link['from']['device']['overview']['wirelessMode'] == 'ap'): + if 'overview' in link['to']['device']: + if ('downlinkCapacity' in link['to']['device']['overview']) and ('uplinkCapacity' in link['to']['device']['overview']): + if (link['to']['device']['overview']['downlinkCapacity'] is not None) and (link['to']['device']['overview']['uplinkCapacity'] is not None): + apID = link['from']['device']['identification']['id'] + # Capacity of the PtMP client radio feeding the PoP will be used as the site bandwidth limit + download = int(round(link['to']['device']['overview']['downlinkCapacity']/1000000)) + upload = int(round(link['to']['device']['overview']['uplinkCapacity']/1000000)) + nodeOffPtMP[id] = {'download': download, + 'upload': upload, + parent: apID + } + if usePtMPasParent: + print('Site ' + name + ' will use PtMP AP ' + link['from']['device']['identification']['name'] + ' as parent from site ' + link['from']['site']['identification']['name']) return siteList, nodeOffPtMP def handleMultipleInternetNodes(sites, dataLinks, uispSite): -- knotmirror 0.0.1 From 7b911e8d6292aa7c80aba32ee6b308caad1d552d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Tue, 16 Apr 2024 14:14:17 -0600 Subject: [PATCH 08/29] Update integrationUISP.py --- src/integrationUISP.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integrationUISP.py b/src/integrationUISP.py index db579239..e83189ac 100644 --- a/src/integrationUISP.py +++ b/src/integrationUISP.py @@ -343,7 +343,7 @@ def findNodesBranchedOffPtMP(siteList, dataLinks, sites, rootSite, foundAirFiber 'upload': upload, parent: apID } - if usePtMPasParent: + if use_ptmp_as_parent: print('Site ' + name + ' will use PtMP AP ' + link['from']['device']['identification']['name'] + ' as parent from site ' + link['from']['site']['identification']['name']) return siteList, nodeOffPtMP -- knotmirror 0.0.1 From d6cf9db8f7ceb38be67f10ee086a8cb5653ad009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Tue, 16 Apr 2024 14:21:37 -0600 Subject: [PATCH 09/29] Update integrationUISP.py --- src/integrationUISP.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/integrationUISP.py b/src/integrationUISP.py index e83189ac..69d5acb1 100644 --- a/src/integrationUISP.py +++ b/src/integrationUISP.py @@ -343,7 +343,8 @@ def findNodesBranchedOffPtMP(siteList, dataLinks, sites, rootSite, foundAirFiber 'upload': upload, parent: apID } - if use_ptmp_as_parent: + if use_ptmp_as_parent(): + site['parent'] = apID print('Site ' + name + ' will use PtMP AP ' + link['from']['device']['identification']['name'] + ' as parent from site ' + link['from']['site']['identification']['name']) return siteList, nodeOffPtMP -- knotmirror 0.0.1 From 4c0af0bdea4972cfd8edf903e55fe7e550e809c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Tue, 16 Apr 2024 16:41:04 -0600 Subject: [PATCH 10/29] Update integrationUISP.py --- src/integrationUISP.py | 84 +++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/src/integrationUISP.py b/src/integrationUISP.py index 69d5acb1..ea9d13ba 100644 --- a/src/integrationUISP.py +++ b/src/integrationUISP.py @@ -299,53 +299,53 @@ def loadRoutingOverrides(): def findNodesBranchedOffPtMP(siteList, dataLinks, sites, rootSite, foundAirFibersBySite): nodeOffPtMP = {} - for site in siteList: - id = site['id'] - name = site['name'] - if id != rootSite['id']: - - if id not in foundAirFibersBySite: - trueParent = findInSiteListById(siteList, id)['parent'] - #parent = findInSiteListById(siteList, id)['parent'] - isTrueSite = False - for siteItem in sites: - if siteItem['identification']['id'] == id: - if siteItem['identification']['type'] == 'site': - isTrueSite = True - if isTrueSite: - if site['parent'] is not None: - parent = site['parent'] - # Check how many links connect site to parent - # If only one link conencts them, we can then consdier if it's a node off PtMP - howManyLinksToParent = 0 - for link in dataLinks: - if (link['to']['site'] is not None) and (link['to']['site']['identification'] is not None): - if ('identification' in link['to']['site']) and (link['to']['site']['identification'] is not None) and link['from'] is not None and link['from']['site'] is not None and link['from']['site']['identification'] is not None: - if link['from']['site']['identification']['id'] == trueParent: - if link['to']['site']['identification']['id'] == id: - howManyLinksToParent += 1 - if howManyLinksToParent == 1: + if use_ptmp_as_parent(): + for site in siteList: + id = site['id'] + name = site['name'] + if id != rootSite['id']: + if id not in foundAirFibersBySite: + trueParent = findInSiteListById(siteList, id)['parent'] + #parent = findInSiteListById(siteList, id)['parent'] + isTrueSite = False + for siteItem in sites: + if siteItem['identification']['id'] == id: + if siteItem['identification']['type'] == 'site': + isTrueSite = True + if isTrueSite: + if site['parent'] is not None: + parent = site['parent'] + # Check how many links connect site to parent + # If only one link conencts them, we can then consdier if it's a node off PtMP + howManyLinksToParent = 0 for link in dataLinks: if (link['to']['site'] is not None) and (link['to']['site']['identification'] is not None): if ('identification' in link['to']['site']) and (link['to']['site']['identification'] is not None) and link['from'] is not None and link['from']['site'] is not None and link['from']['site']['identification'] is not None: - # Respect parent defined by topology and overrides if link['from']['site']['identification']['id'] == trueParent: if link['to']['site']['identification']['id'] == id: - if (link['from']['device']['overview']['wirelessMode'] == 'ap-ptmp') or (link['from']['device']['overview']['wirelessMode'] == 'ap'): - if 'overview' in link['to']['device']: - if ('downlinkCapacity' in link['to']['device']['overview']) and ('uplinkCapacity' in link['to']['device']['overview']): - if (link['to']['device']['overview']['downlinkCapacity'] is not None) and (link['to']['device']['overview']['uplinkCapacity'] is not None): - apID = link['from']['device']['identification']['id'] - # Capacity of the PtMP client radio feeding the PoP will be used as the site bandwidth limit - download = int(round(link['to']['device']['overview']['downlinkCapacity']/1000000)) - upload = int(round(link['to']['device']['overview']['uplinkCapacity']/1000000)) - nodeOffPtMP[id] = {'download': download, - 'upload': upload, - parent: apID - } - if use_ptmp_as_parent(): - site['parent'] = apID - print('Site ' + name + ' will use PtMP AP ' + link['from']['device']['identification']['name'] + ' as parent from site ' + link['from']['site']['identification']['name']) + howManyLinksToParent += 1 + if howManyLinksToParent == 1: + for link in dataLinks: + if (link['to']['site'] is not None) and (link['to']['site']['identification'] is not None): + if ('identification' in link['to']['site']) and (link['to']['site']['identification'] is not None) and link['from'] is not None and link['from']['site'] is not None and link['from']['site']['identification'] is not None: + # Respect parent defined by topology and overrides + if link['from']['site']['identification']['id'] == trueParent: + if link['to']['site']['identification']['id'] == id: + if (link['from']['device']['overview']['wirelessMode'] == 'ap-ptmp') or (link['from']['device']['overview']['wirelessMode'] == 'ap'): + if 'overview' in link['to']['device']: + if ('downlinkCapacity' in link['to']['device']['overview']) and ('uplinkCapacity' in link['to']['device']['overview']): + if (link['to']['device']['overview']['downlinkCapacity'] is not None) and (link['to']['device']['overview']['uplinkCapacity'] is not None): + apID = link['from']['device']['identification']['id'] + # Capacity of the PtMP client radio feeding the PoP will be used as the site bandwidth limit + download = int(round(link['to']['device']['overview']['downlinkCapacity']/1000000)) + upload = int(round(link['to']['device']['overview']['uplinkCapacity']/1000000)) + nodeOffPtMP[id] = {'download': download, + 'upload': upload, + parent: apID + } + if use_ptmp_as_parent(): + site['parent'] = apID + print('Site ' + name + ' will use PtMP AP ' + link['from']['device']['identification']['name'] + ' as parent from site ' + link['from']['site']['identification']['name']) return siteList, nodeOffPtMP def handleMultipleInternetNodes(sites, dataLinks, uispSite): -- knotmirror 0.0.1 From dba1ed78aec8cf4ba96839c6b0863fb7c0b68a0a Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Wed, 24 Apr 2024 13:17:46 -0500 Subject: [PATCH 11/29] Re-enable InfluxDB support with the new configuration. --- src/scheduler.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/scheduler.py b/src/scheduler.py index 25b16b4a..2c7c5e3c 100644 --- a/src/scheduler.py +++ b/src/scheduler.py @@ -1,9 +1,9 @@ import time import datetime from LibreQoS import refreshShapers, refreshShapersUpdateOnly -#from graphInfluxDB import refreshBandwidthGraphs, refreshLatencyGraphs +from graphInfluxDB import refreshBandwidthGraphs, refreshLatencyGraphs from liblqos_python import automatic_import_uisp, automatic_import_splynx, queue_refresh_interval_mins, \ - automatic_import_powercode, automatic_import_sonar + automatic_import_powercode, automatic_import_sonar, influx_db_enabled if automatic_import_uisp(): from integrationUISP import importFromUISP if automatic_import_splynx(): @@ -39,15 +39,15 @@ def importFromCRM(): except: print("Failed to import from Sonar") -#def graphHandler(): -# try: -# refreshBandwidthGraphs() -# except: -# print("Failed to update bandwidth graphs") -# try: -# refreshLatencyGraphs() -# except: -# print("Failed to update latency graphs") +def graphHandler(): + try: + refreshBandwidthGraphs() + except: + print("Failed to update bandwidth graphs") + try: + refreshLatencyGraphs() + except: + print("Failed to update latency graphs") def importAndShapeFullReload(): importFromCRM() @@ -62,7 +62,7 @@ if __name__ == '__main__': ads.add_job(importAndShapePartialReload, 'interval', minutes=queue_refresh_interval_mins(), max_instances=1) - #if influxDBEnabled: - # ads.add_job(graphHandler, 'interval', seconds=10, max_instances=1) + if influx_db_enabled(): + ads.add_job(graphHandler, 'interval', seconds=10, max_instances=1) ads.start() -- knotmirror 0.0.1 From 062e1e7eb8bc81d28404c280bfd1cac68188e8dd Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Wed, 24 Apr 2024 15:43:43 -0500 Subject: [PATCH 12/29] Minimal read-only view of most of the configuration - a good start. --- src/rust/lqos_node_manager/static/config.html | 747 ++++++++++-------- 1 file changed, 415 insertions(+), 332 deletions(-) diff --git a/src/rust/lqos_node_manager/static/config.html b/src/rust/lqos_node_manager/static/config.html index 90fb07dc..fb687f5f 100644 --- a/src/rust/lqos_node_manager/static/config.html +++ b/src/rust/lqos_node_manager/static/config.html @@ -63,15 +63,26 @@
+

Display Settings

@@ -106,299 +117,401 @@
-
-

Network Settings

+ +
+

General Settings

- + + - + + - - + + - - + + - + + - + + - - +
Setup the basic network interface configuration.
Interface facing your core router
Interface facing the Internet

Single-Interface ("On A Stick") Configuration

- - -
+
+ + +
+

Anonymous Usage Statistics Settings

+ + + + + - - + + +
VLAN facing your core router - -
+
+ + +
+

Tuning Settings

+ + - - + + - + + - + + - + + + + + + + + + + - + + - + +
VLAN facing the Internet - -
-

Bifrost XDP-Accelerated Bridge

- -
- - -
Interface Mapping
VLAN Mapping
-
-

Shaper Settings

-

Tune the LibreQoS traffic shaper to your needs.

+ + +
+

Bridge Settings

+
+ + +
+

Queue Settings

+ - + - - + + + - - + + - - + + + - + + - + + - - + + - - + + - - + + + + + + + + +
-

Traffic Shaping Control

+
+
SQM Mode - -
Monitor mode disables all traffic shaping, allowing you to watch your network undisturbed.
- - -
-

Bandwidth

-
Total Download Bandwidth (Mbps)
Total Upload Bandwidth (Mbps)
- Devices without a parent will be placed underneath evenly-balanced generated nodes. This defines the - available bandwidth for those nodes. If in doubt, set to equal your total bandwidth. -
+
+ + +
+

Long-Term Stats Settings

+ + + + - - + + - - + + - - + + + -
Generated Node Download Bandwidth (Mbps)
Generated Node Upload Bandwidth (Mbps)
- Bin packing is only useful for devices without parent nodes in the shaper tree. Enable this option - to automatically assign devices to nodes based on the device's plans, evenly balancing load across - CPUs. -
- - -
-
-

Server Settings

+ + +
+

IP Ranges Settings

+ ... +
+ + +
+

Flows Settings

- + + - + + - + + - + + - + +
- Disabling actual shell commands stops LibreQoS from actually doing anything. Simulated - output is logged to the console and text files, allowing for debugging. -
- - -
- Running shell commands with "sudo" isn't necessary on a default configuration. -
- - -
- Overriding the number of queues is only necessary if your NIC is giving - very strange results. Use with extreme caution. Leave this at 0 unless you really know what you are doing. + +
+
+ + +
+

Common Integration Settings

+ + + + + - - + + + + + +
Override count of available queues?
-
-

Tuning Settings

+ + +
+

Spylnx Integration Settings

- + + - + + + + + + + + + +
+
+ + +
+

UISP Integration Settings

+ + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + - - - + + - - - + + - - - + + - - + + + +
- Queue Check Frequency (ms) +
- +
IRQ Balancing should generally be disabled.
- - -
Network device budget (usec) controls how frequently the kernel passes batches of packets to the processing system. Low numbers tend to reduce latency, higher numbers can improve throughput.
Netdev Budget (usecs)
Network device budget (packets) controls how frequently the kernel passes batches of packets to the processing system. Low numbers tend to reduce latency, higher numbers can improve throughput.
Netdev Budget (packets)
How frequently should the kernel poll for receive packets?
RX Usecs
How frequently should the kernel poll for transmit packets?
TX Usecs
If you are using VLANs, you generally need to enable this feature
- - -
+
+ + +
+

Powercode Integration Settings

+ + + + - - + + - - - + +
If you are using VLANs, you generally need to enable this feature
- - -
Offloads to disable. We've tried to include the important ones.
Disable Offloads (space separated)
+
- - Apply Tuning Settings + +
+

Sonar Integration Settings

+ + + + + + + + + + + + + + + + + +
-
- Spylnx Settings + + +
+

InfluxDB Integration Settings

+ + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+

Network.Json - Network Layout

...
-
- UISP Settings + + +
+

Shaped Devices

...
+

LibreQos Web Interface Users

@@ -417,10 +530,103 @@
© 2022-2023, LibreQoE LLC