mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(linux): don't fail on unsupported IP version (#7583)
Firezone always attempts to handle IPv4 and IPv6. On Linux systems without an IPv6 stack, attempts to add an IPv6 route may fail with "Not supported (os error 95)". We don't need the IPv6 routes on those systems as we will never receive IPv6 traffic. Therefore, we can safely ignore these errors and not log them.
This commit is contained in:
@@ -261,6 +261,11 @@ async fn add_route(route: &IpNetwork, idx: u32, handle: &Handle) {
|
||||
return;
|
||||
}
|
||||
|
||||
// On systems without support for a certain IP version (i.e. no IPv6), attempting to add a route may result in "Not supported (os error 95)".
|
||||
if matches!(&err, NetlinkError(err) if err.raw_code() == -libc::EOPNOTSUPP) {
|
||||
return;
|
||||
}
|
||||
|
||||
tracing::warn!(error = std_dyn_err(&err), %route, "Failed to add route");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user