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

Commit c584a24b authored by Irfan Sheriff's avatar Irfan Sheriff Committed by Android Git Automerger
Browse files

am 2140d1de: Merge "Avoid system_server crashing due to mac address is null"

* commit '2140d1de':
  Avoid system_server crashing due to mac address is null
parents 29c6f24b 2140d1de
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");