diff --git a/src/mdns.zig b/src/mdns.zig index f64ba03..f5c8521 100644 --- a/src/mdns.zig +++ b/src/mdns.zig @@ -152,9 +152,11 @@ fn parse_mdns_response(response: []u8, ip_info: util.IPInfo) !util.IP { continue; } if (ip_len == 4) { - var addr_buff = [_]u8{0x00} ** 4; - @memcpy(&addr_buff, ip_bytes); - addr = std.net.Address.initIp4(addr_buff, 0); + if (ip_bytes[0] == 192 and ip_bytes[1] == 168) { + var addr_buff = [_]u8{0x00} ** 4; + @memcpy(&addr_buff, ip_bytes); + addr = std.net.Address.initIp4(addr_buff, 0); + } } else if (ip_len == 16) { if (ip_bytes[0] == 0xfd) { var addr_buff = [_]u8{0x00} ** 16;