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

Commit 2d24f7a3 authored by Neil Fuller's avatar Neil Fuller Committed by Gerrit Code Review
Browse files

Merge "Switch to a single PacketSocketAddress constructor"

parents 09f66757 6ae89f2f
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -69,7 +69,10 @@ public final class SocketUtils {
     */
    @NonNull
    public static SocketAddress makePacketSocketAddress(int protocol, int ifIndex) {
        return new PacketSocketAddress((short) protocol, ifIndex);
        return new PacketSocketAddress(
                (short) protocol /* sll_protocol */,
                ifIndex /* sll_ifindex */,
                null /* sll_addr */);
    }

    /**
@@ -77,7 +80,10 @@ public final class SocketUtils {
     */
    @NonNull
    public static SocketAddress makePacketSocketAddress(int ifIndex, @NonNull byte[] hwAddr) {
        return new PacketSocketAddress(ifIndex, hwAddr);
        return new PacketSocketAddress(
                (short) 0 /* sll_protocol */,
                ifIndex /* sll_ifindex */,
                hwAddr /* sll_addr */);
    }

    /**