Accept separate OPNsense inventory and show VPN and PF observations in device details
Rust development slice / linux (push) Failing after 13s
Rust development slice / linux (push) Failing after 13s
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
//! Additive bounded passive metadata; the strict original Inventory stays intact.
|
||||
mod opnsense;
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
@@ -64,6 +65,9 @@ pub fn validate_for_scope(
|
||||
now: DateTime<Utc>,
|
||||
scope: &str,
|
||||
) -> Result<Value, &'static str> {
|
||||
if scope == "opnsense.base" {
|
||||
return opnsense::validate(bytes);
|
||||
}
|
||||
if scope == "agent.update" {
|
||||
if bytes.len() > 65536 {
|
||||
return Err("AGENT_UPDATE_INVENTORY_SIZE");
|
||||
|
||||
Reference in New Issue
Block a user