[][src]Function erbium::dhcp::build_default_config

pub async fn build_default_config<'_, '_>(
    conf: &'_ Config,
    request: &'_ DHCPRequest
) -> Policy

Produce a default configuration. This builds a configuration that would look like:

# Always match the base configuration
match-all: true
# For top level settings, apply them.
apply-dns-servers: [ip4s]
apply-dns-search: [domains]
apply-captive-portal: captiveportal
policies:
 # For each IPv4 prefix provided in the addresses top level config:
 - match-subnet: prefix4
   apply-subnet: prefix4 # with the current requestip removed.