1 Star 0 Fork 6

shirely/ORBit2

forked from src-openEuler/ORBit2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0005-Fix-link_protocol_is_local_ipv46-for-ipv4-on-some-ip.patch 1012 Bytes
一键复制 编辑 原始数据 按行查看 历史
dogsheng 提交于 2019-12-25 16:00 . Package init
From 623749eb6e2a87f6a8723b68e0d224b8ea08ff60 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <[email protected]>
Date: Tue, 12 Feb 2013 00:27:41 -0500
Subject: [PATCH 05/18] Fix link_protocol_is_local_ipv46 for ipv4 on some
ipv6-enabled machines
Ensure that saddr is compared to an ipv4 local_addr, not to an ipv6 one,
by setting hints.ai_family before calling getaddrinfo().
https://bugzilla.gnome.org/show_bug.cgi?id=693636
---
linc2/src/linc-protocols.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/linc2/src/linc-protocols.c b/linc2/src/linc-protocols.c
index e6895f4..22a77aa 100644
--- a/linc2/src/linc-protocols.c
+++ b/linc2/src/linc-protocols.c
@@ -383,6 +383,7 @@ link_protocol_is_local_ipv46 (const LinkProtocolInfo *proto,
memset(&hints, 0, sizeof(hints));
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_CANONNAME;
+ hints.ai_family = proto->family;
if (getaddrinfo(link_get_local_hostname(), NULL, &hints, &local_addr) != 0) {
if (!warned++)
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shirely16/ORBit2.git
[email protected]:shirely16/ORBit2.git
shirely16
ORBit2
ORBit2
master

搜索帮助