From 83e0750cdea707688b1bc2f966a6274166036aa6 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Sat, 5 Feb 2022 04:15:28 +0900 Subject: [PATCH] client: set default MTU to 1412 for all interfaces Since peer endpoints can be either IPv4 or IPv6, it doesn't make sense to specify a default MTU that could only work with IPv4 based on only the server's endpoint. Setting to 1412 instead of 1420 in order to accomodate PPPoE peers, which should fit most internet situations. --- shared/src/wg.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/shared/src/wg.rs b/shared/src/wg.rs index 71fd48b..df6dfbe 100644 --- a/shared/src/wg.rs +++ b/shared/src/wg.rs @@ -102,11 +102,7 @@ pub fn up( set_addr(interface, address)?; set_up( interface, - network.mtu.unwrap_or(if matches!(address, IpNet::V4(_)) { - 1420 - } else { - 1400 - }), + network.mtu.unwrap_or(1412), )?; if !network.no_routing { add_route(interface, address)?;