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

Commit 2140d1de authored by Irfan Sheriff's avatar Irfan Sheriff Committed by android code review
Browse files

Merge "Avoid system_server crashing due to mac address is null"

parents 6ffe2594 21326d8b
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -53,10 +53,12 @@ public class ArpPeer {
        mInterfaceName = interfaceName;
        mMyAddr = myAddr;

        if (mac != null) {
            for (int i = 0; i < MAC_ADDR_LENGTH; i++) {
                mMyMac[i] = (byte) Integer.parseInt(mac.substring(
                            i*3, (i*3) + 2), 16);
            }
        }

        if (myAddr instanceof Inet6Address || peer instanceof Inet6Address) {
            throw new IllegalArgumentException("IPv6 unsupported");