fix: convert MacAddr from vector to int

Still expose a vector / slice API with .fromSlice,
This commit is contained in:
2026-04-15 19:44:48 -04:00
committed by Tangled
parent 1f500b9b0a
commit 7077aae9ce
2 changed files with 15 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ pub fn sendRelay(self: *Client, io: Io, payload: []const u8, dest: [4]u8) !void
const rand = io_source.interface();
var headers: EthIpUdp = .{
.src_mac = self.socket.mac,
.src_mac = .fromSlice(self.socket.mac),
.ip = .{
.id = rand.int(u16),
.src_addr = 0, //rand.int(u32),
@@ -86,7 +86,7 @@ pub fn connect(self: Client, io: Io, payload: []const u8) (error{ BpfAttachFaile
const rand = io_source.interface();
var headers: EthIpUdp = .{
.src_mac = self.socket.mac,
.src_mac = .fromSlice(self.socket.mac),
.ip = .{
.id = rand.int(u16),
.src_addr = 0, //rand.int(u32),