Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1ad41b6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Reduce advertised ipv6 mtu by 16 to fit ethernet header"

parents 3bdf29c1 34d43616
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -610,7 +610,12 @@ public class IpServer extends StateMachine {

        if (v6only != null) {
            params = new RaParams();
            params.mtu = v6only.getMtu();
            // We advertise an mtu lower by 16, which is the closest multiple of 8 >= 14,
            // the ethernet header size.  This makes kernel ebpf tethering offload happy.
            // This hack should be reverted once we have the kernel fixed up.
            // Note: this will automatically clamp to at least 1280 (ipv6 minimum mtu)
            // see RouterAdvertisementDaemon.java putMtu()
            params.mtu = v6only.getMtu() - 16;
            params.hasDefaultRoute = v6only.hasIpv6DefaultRoute();

            if (params.hasDefaultRoute) params.hopLimit = getHopLimit(v6only.getInterfaceName());