# mDNS：来自192.168.1.50:5353的响应与对_http._tcp.local的查询不匹配，已忽略

- **ID:** `networking/mdns-response-mismatch`
- **领域:** networking
- **类别:** protocol_error
- **验证级别:** ai_generated
- **修复率:** 75%

## 根因

多播DNS响应者发送的响应与查询的问题部分不匹配，通常是由于服务广告配置错误或有缺陷的mDNS实现回复了无关记录，导致客户端丢弃该响应。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Avahi 0.8 | active | — | — |
| systemd-resolved 252 | active | — | — |
| Bonjour (macOS Ventura) | active | — | — |

## 解决方案

1. ```
   tcpdump -i eth0 port 5353 -X | grep -A5 'mDNS'
   ```
2. ```
   iptables -A INPUT -s 192.168.1.50 -p udp --dport 5353 -j DROP
   ```

## 无效尝试

- **Clearing the local mDNS cache using systemd-resolved or Avahi commands.** — The cache is not the issue; the problem is the responder sending mismatched responses. Flushing cache only removes local entries, not the faulty responder behavior. (90% 失败率)
- **Adjusting TTL on mDNS records to reduce query frequency.** — Does not address the mismatch in response; the responder will still send incorrect replies regardless of TTL. (85% 失败率)
