feat(wip): Support opnsense 25.7 which defaults to dnsmasq instead of isc dhcp
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use crate::dnsmasq::DnsMasq;
|
||||
use crate::HAProxy;
|
||||
use crate::{data::dhcpd::DhcpInterface, xml_utils::to_xml_str};
|
||||
use log::error;
|
||||
@@ -22,7 +23,7 @@ pub struct OPNsense {
|
||||
pub load_balancer: Option<LoadBalancer>,
|
||||
pub rrd: Option<RawXml>,
|
||||
pub ntpd: Ntpd,
|
||||
pub widgets: Widgets,
|
||||
pub widgets: Option<Widgets>,
|
||||
pub revision: Revision,
|
||||
#[yaserde(rename = "OPNsense")]
|
||||
pub opnsense: OPNsenseXmlSection,
|
||||
@@ -45,7 +46,7 @@ pub struct OPNsense {
|
||||
#[yaserde(rename = "Pischem")]
|
||||
pub pischem: Option<Pischem>,
|
||||
pub ifgroups: Ifgroups,
|
||||
pub dnsmasq: Option<RawXml>,
|
||||
pub dnsmasq: Option<DnsMasq>,
|
||||
}
|
||||
|
||||
impl From<String> for OPNsense {
|
||||
@@ -165,9 +166,9 @@ pub struct Sysctl {
|
||||
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
pub struct SysctlItem {
|
||||
pub descr: MaybeString,
|
||||
pub tunable: String,
|
||||
pub value: MaybeString,
|
||||
pub descr: Option<MaybeString>,
|
||||
pub tunable: Option<String>,
|
||||
pub value: Option<MaybeString>,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
@@ -182,8 +183,8 @@ pub struct System {
|
||||
pub domain: String,
|
||||
pub group: Vec<Group>,
|
||||
pub user: Vec<User>,
|
||||
pub nextuid: u32,
|
||||
pub nextgid: u32,
|
||||
pub nextuid: Option<u32>,
|
||||
pub nextgid: Option<u32>,
|
||||
pub timezone: String,
|
||||
pub timeservers: String,
|
||||
pub webgui: WebGui,
|
||||
@@ -242,6 +243,7 @@ pub struct Ssh {
|
||||
pub passwordauth: u8,
|
||||
pub keysig: MaybeString,
|
||||
pub permitrootlogin: u8,
|
||||
pub rekeylimit: Option<MaybeString>,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
@@ -271,6 +273,7 @@ pub struct Group {
|
||||
pub member: Vec<u32>,
|
||||
#[yaserde(rename = "priv")]
|
||||
pub priv_field: String,
|
||||
pub source_networks: Option<MaybeString>,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
|
||||
Reference in New Issue
Block a user