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

Commit db5814ed authored by Pierre Imai's avatar Pierre Imai Committed by Lorenzo Colitti
Browse files

DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is

specified for a given network.

Bug: 10705136

(cherry picked from commit 54f0d9ed)

(cherry picked from commit accd5fcb)

Change-Id: I12ac6f511a6760ef26f489ba3a052ca3c125e5ee
parent c4adc2ce
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1804,11 +1804,14 @@ public class ConnectivityService extends IConnectivityManager.Stub
    private void updateMtu(LinkProperties newLp, LinkProperties oldLp) {
        final String iface = newLp.getInterfaceName();
        final int mtu = newLp.getMtu();
        if (oldLp == null && mtu == 0) {
            // Silently ignore unset MTU value.
            return;
        }
        if (oldLp != null && newLp.isIdenticalMtu(oldLp)) {
            if (VDBG) log("identical MTU - not setting");
            return;
        }

        if (LinkProperties.isValidMtu(mtu, newLp.hasGlobalIPv6Address()) == false) {
            if (mtu != 0) loge("Unexpected mtu value: " + mtu + ", " + iface);
            return;