diff options
author | Himbeer <himbeer@disroot.org> | 2025-03-18 15:58:12 +0100 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2025-03-18 15:58:12 +0100 |
commit | 0dc02fb3e5e24471c6929c0d1073060666644b76 (patch) | |
tree | 6bfadecda2bff73a845f66d5f5a7a4001083ca1d | |
parent | 19e65e31aa03d2a1da313a25856afb01c81c4b92 (diff) |
Don't create routes for AllowedIPs
These routes can be added using rsdsl_rtd. This allows WireGuard links
to have AllowedIPs = 0.0.0.0/0, ::/0 without overriding the default
route.
-rw-r--r-- | src/main.rs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/main.rs b/src/main.rs index 123abcd..339bcd0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -433,29 +433,6 @@ fn configure_netlink(name: String, ip_config: IpConfig) -> Result<(), SetupError conn.address_add(name.clone(), addr, prefix_length)?; } - for wireguard_control::AllowedIp { address, cidr } in ip_config.allowed_ips { - match address { - IpAddr::V4(address) => conn.route_add4(rsdsl_netlinklib::route::Route4 { - dst: address, - prefix_len: cidr, - rtr: None, - on_link: false, - table: None, - metric: None, - link: name.clone(), - }), - IpAddr::V6(address) => conn.route_add6(rsdsl_netlinklib::route::Route6 { - dst: address, - prefix_len: cidr, - rtr: None, - on_link: false, - table: None, - metric: None, - link: name.clone(), - }), - }?; - } - Ok(()) } |