瀏覽代碼

known_hosts: sort IP addresses

in order to prevent unnecessary changes due to
random ordering of dig results.
master
Alexander Weidinger 7 年之前
父節點
當前提交
70461403cb
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      openssh/files/ssh_known_hosts

+ 1
- 1
openssh/files/ssh_known_hosts 查看文件

@@ -22,7 +22,7 @@
{%- set ip4 = salt['dig.A'](host) -%}
{%- set ip6 = salt['dig.AAAA'](host) -%}
{%- set names = [host_names.get(host, host)] -%}
{%- for ip in ip4 + ip6 -%}
{%- for ip in (ip4 + ip6)|sort -%}
{%- do names.append(ip) -%}
{%- for alias in aliases_ips.get(ip, []) -%}
{%- if alias not in names -%}

Loading…
取消
儲存