Skip to content

Commit 62b8608

Browse files
authored
Merge pull request #68 from freifunkMUC/fix_domain_switch
Replace or create existing route
2 parents 7563827 + 3ec0260 commit 62b8608

File tree

4 files changed

+2
-5
lines changed

4 files changed

+2
-5
lines changed

wgkex.yaml.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ mqtt:
1919
keepalive: 5
2020
tls: False
2121
domain_prefix: myprefix-
22-
log_level: DEBUG
2322
logging_config:
2423
formatters:
2524
standard:

wgkex/common/logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828

2929

30-
def fetch_logging_configuration() -> dict[str, str]:
30+
def fetch_logging_configuration():
3131
"""Fetches logging configuration from disk, if exists.
3232
3333
If the config exists, then we check to see if the key 'logging_config' is set. If it is, we return this configuration.

wgkex/config/config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ class Config:
6666
domains: List[str]
6767
mqtt: MQTT
6868
domain_prefix: str
69-
log_level: str
7069

7170
@classmethod
7271
def from_dict(cls, cfg: Dict[str, str]) -> "Config":
@@ -81,7 +80,6 @@ def from_dict(cls, cfg: Dict[str, str]) -> "Config":
8180
domains=cfg["domains"],
8281
mqtt=mqtt_cfg,
8382
domain_prefix=cfg["domain_prefix"],
84-
log_level=cfg["log_level"],
8583
)
8684

8785

wgkex/worker/netlink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def route_handler(client: WireGuardClient) -> Dict:
167167
# TODO(ruairi): Splice this into an add_ and remove_ function.
168168
with pyroute2.IPRoute() as ip:
169169
return ip.route(
170-
"del" if client.remove else "add",
170+
"del" if client.remove else "replace",
171171
dst=client.lladdr,
172172
oif=ip.link_lookup(ifname=client.wg_interface)[0],
173173
)

0 commit comments

Comments
 (0)