11 Star 7 Fork 56

src-openEuler/openssh

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-upstream-when-connecting-via-socket-the-default-case.patch 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
bitianyuan 提交于 2024-11-06 16:06 . backport some upstream patches
From 26f3f3bbc69196d908cad6558c8c7dc5beb8d74a Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Wed, 15 Nov 2023 23:03:38 +0000
Subject: [PATCH] upstream: when connecting via socket (the default case),
filter
addresses by AddressFamily if one was specified. Fixes the case where, if
CanonicalizeHostname is enabled, ssh may ignore AddressFamily. bz5326; ok
dtucker
OpenBSD-Commit-ID: 6c7d7751f6cd055126b2b268a7b64dcafa447439
Reference:https://github.com/openssh/openssh-portable/commit/26f3f3bbc69196d908cad6558c8c7dc5beb8d74a
Conflict:NA
---
sshconnect.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sshconnect.c b/sshconnect.c
index e6012f01e..ff3d3501f 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.c,v 1.363 2023/03/10 07:17:08 dtucker Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.364 2023/11/15 23:03:38 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -481,6 +481,14 @@ ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop,
errno = oerrno;
continue;
}
+ if (options.address_family != AF_UNSPEC &&
+ ai->ai_family != options.address_family) {
+ debug2_f("skipping address [%s]:%s: "
+ "wrong address family", ntop, strport);
+ errno = 0;
+ continue;
+ }
+
debug("Connecting to %.200s [%.100s] port %s.",
host, ntop, strport);
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/openssh.git
git@gitee.com:src-openeuler/openssh.git
src-openeuler
openssh
openssh
master

搜索帮助