diff --git a/README.md b/README.md index a9990cc..8e0a5b7 100644 --- a/README.md +++ b/README.md @@ -40,4 +40,5 @@ logging_config: - console level: DEBUG version: 1 +fallback_domain: "unifi_respondd_fallback" # optional ``` diff --git a/unifi_respondd.yaml.example b/unifi_respondd.yaml.example index 9fbd069..48dd1dd 100644 --- a/unifi_respondd.yaml.example +++ b/unifi_respondd.yaml.example @@ -28,4 +28,5 @@ logging_config: handlers: - console level: DEBUG - version: 1 \ No newline at end of file + version: 1 +fallback_domain: "unifi_respondd_fallback" # optional diff --git a/unifi_respondd/config.py b/unifi_respondd/config.py index f93cc3f..a53396e 100644 --- a/unifi_respondd/config.py +++ b/unifi_respondd/config.py @@ -73,6 +73,7 @@ def from_dict(cls, cfg: Dict[str, str]) -> "Config": unicast_port=cfg["unicast_port"], interface=cfg["interface"], verbose=cfg["verbose"], + fallback_domain=cfg.get("fallback_domain", None), ) diff --git a/unifi_respondd/unifi_client.py b/unifi_respondd/unifi_client.py index 143a874..431a7e8 100644 --- a/unifi_respondd/unifi_client.py +++ b/unifi_respondd/unifi_client.py @@ -221,9 +221,7 @@ def get_infos(): gateway6=offloader.get("gateway6", None), gateway_nexthop=offloader_id, neighbour_macs=neighbour_macs, - domain_code=offloader.get( - "domain", "ffmuc_unifi_respondd_fallback" - ), + domain_code=offloader.get("domain", cfg.fallback_domain), ) ) return aps