diff options
| author | David Lönnhager <david.l@mullvad.net> | 2020-05-04 20:04:20 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2020-05-04 20:04:20 +0200 |
| commit | e55052a87013db778c14994865651b7ef6d7c6b7 (patch) | |
| tree | 3f5eb86f6482f7d9bcc1b0abc3c2301fe02f90f9 | |
| parent | af4508e04cda6a3389408ee498ecff32178a49e3 (diff) | |
| parent | 16ad444bc4b9e207817c973564f94aa963612ae7 (diff) | |
| download | mullvadvpn-e55052a87013db778c14994865651b7ef6d7c6b7.tar.xz mullvadvpn-e55052a87013db778c14994865651b7ef6d7c6b7.zip | |
Merge branch 'route-man-overflow'
| -rw-r--r-- | talpid-core/src/routing/linux.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/talpid-core/src/routing/linux.rs b/talpid-core/src/routing/linux.rs index 288e7e5f5a..124c25e319 100644 --- a/talpid-core/src/routing/linux.rs +++ b/talpid-core/src/routing/linux.rs @@ -607,8 +607,8 @@ impl RouteManagerImplInner { .destination_prefix(v4_prefix.ip(), v4_prefix.prefix()) .table(route.table_id); - if v4_prefix.size() > 1 { - add_message = add_message.scope(RT_SCOPE_LINK) + if v4_prefix.prefix() > 0 && v4_prefix.prefix() < 32 { + add_message = add_message.scope(RT_SCOPE_LINK); } if let Some(IpAddr::V4(node_address)) = route.node.get_address() { @@ -632,8 +632,8 @@ impl RouteManagerImplInner { .destination_prefix(v6_prefix.ip(), v6_prefix.prefix()) .table(route.table_id); - if v6_prefix.size() > 1 { - add_message = add_message.scope(RT_SCOPE_LINK) + if v6_prefix.prefix() > 0 && v6_prefix.prefix() < 128 { + add_message = add_message.scope(RT_SCOPE_LINK); } if let Some(IpAddr::V6(node_address)) = route.node.get_address() { |
