链路范围 IPv6 多播数据包突然无法在 MacBook Pro 上路由?

发布于 2024-07-30 08:34:34 字数 602 浏览 3 评论 0原文

这是一个有点晦涩的问题,但我很困惑,我想也许有人对这个问题有更多的线索。

我的同事已经在他的 MacBook Pro 上成功运行了一个使用 IPv6 多播的内部应用程序几个月了,但今天 Mac 决定停止路由多播数据包。 特别是,程序打印此错误:

SendDataUDP(ff02::bead:cede:deed:feed@4) failed on Network interface [Name=[en0] Description=[] IP=[fe80::222:41ff:fe21: dfd4@4] 网络掩码=[ffff:ffff:ffff:ffff::] 广播=[::]] (errno=65/没有到主机的路由)。

...这很好地描述了出了什么问题...它尝试将 UDP 数据包发送到显示的 IP 地址,但 send() 失败,并显示 errno=EHOSTUNREACH。

我不明白的是,什么可能导致 IPv6 链路范围多播地址“无法访问”? 如果我对链路范围多播的理解是正确的,则数据包只需从本地以太网端口(在本例中为 en0,该端口已启动并在该计算机上工作)发出即可。

我是否遗漏了多播的某些方面,或者他的机器只是坏了? 他说他没有改变任何东西,只是神秘地停止工作了。

This is a slightly obscure question, but I'm stumped and I thought maybe somebody out there might have more of a clue on the issue.

My co-worker has been successfully running an in-house application that uses IPv6 multicasting on his MacBook Pro for several months, but today the Mac decided to stop routing the multicast packets. In particular, the program prints this error:

SendDataUDP(ff02::bead:cede:deed:feed@4) failed on Network interface [Name=[en0] Description=[] IP=[fe80::222:41ff:fe21:dfd4@4] Netmask=[ffff:ffff:ffff:ffff::] Broadcast=[::]] (errno=65/No route to host).

... which pretty well describes what went wrong... it tried to sendto() a UDP packet to the IP address shown, and send() failed with errno=EHOSTUNREACH.

What I don't understand is, what could possibly cause an IPv6 link-scope multicast address to be "unreachable"? If my understanding of link-scope multicast is correct, the packet only has to go out the local ethernet port (en0 in this case, which is up and working on that machine).

Is there some aspect to multicasting that I'm missing, or is his machine just borked? He says he didn't change anything, it just mysteriously stopped working.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

往日 2024-08-06 08:34:35

要测试 en0 是否仍然能够传输链路本地多播请求,请尝试

ping6 ff02::1%en0

这会联系所有主机,因此您应该会得到大量响应(为了好玩,请尝试添加 -w)。

To test whether en0 is still capable of transmitting link-local multicast requests, try

ping6 ff02::1%en0

This contacts all hosts, so you should get plenty of responses (for fun, try adding -w).

满栀 2024-08-06 08:34:35

查看内核可能会有所帮助来源。 (特别是出口 IPv6 数据包出口路径 ip6_output.c)当您在那里时,您还可以查看通向它的套接字调用等。

对于多播,假设您将其设置为 < code>ip6_output(),看来获得此错误的唯一可能方法是不指定要发送的接口。 (这很奇怪,因为你的错误消息明确提到了接口)

是否有可能这台 MacBook 上的无线接口在以前没有启用时已经启用,而现在“链路本地”多播的想法是模糊的? 使用套接字时是否显式指定接口? 地址末尾的@4 对我来说看起来很奇怪。 (这是一个接口索引吗?)惯例通常是使用 % 作为接口范围 ID,但正如前面的答案及其注释中所述,它并未得到普遍支持。

It might help to look at the kernel source. (In particular, the egress IPv6 packet egress path, ip6_output.c) While you're in there, you could also take a look at the socket calls leading up to it, etc.

For multicast, assuming you're making it to ip6_output(), it looks like the only possible way to get this error is by not specifying the interface to send on. (which is odd since your error message explicitly mentions the interface)

Is it possible that the wireless interface on this MacBook has been enabled when it wasn't before, and now the idea of a "link-local" multicast is ambiguous? Are you explicitly specifying the interface when you use the socket? The @4 at the end of the address looks odd to me. (Is that an interface index?) The convention is usually to use % for an interface scope-id, but as noted in the previous answer and its comments, it's not universally supported.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文