Skip to content

Commit

Permalink
make fallback domain configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
grische committed Jan 3, 2024
1 parent ab0cd0f commit 69748ea
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ logging_config:
- console
level: DEBUG
version: 1
fallback_domain: "unifi_respondd_fallback" # optional
```
3 changes: 2 additions & 1 deletion unifi_respondd.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ logging_config:
handlers:
- console
level: DEBUG
version: 1
version: 1
fallback_domain: "unifi_respondd_fallback" # optional
1 change: 1 addition & 0 deletions unifi_respondd/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)


Expand Down
4 changes: 1 addition & 3 deletions unifi_respondd/unifi_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 69748ea

Please sign in to comment.