diff options
author | Ross Burton <ross.burton@arm.com> | 2023-01-13 17:14:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-14 00:14:27 +0000 |
commit | bd1edfa3d5b1c24cd1192620f7085ee1df03e1af (patch) | |
tree | 14838ae41ff20ffc971326d3830be4f90935fe6c | |
parent | 2e33c422a48e026a1d7913d97129612417e356ee (diff) | |
download | poky-bd1edfa3d5b1c24cd1192620f7085ee1df03e1af.tar.gz |
cve-update-db-native: show IP on failure
We get random SSL failures when fetching the CVE database, and it's
notable that the NVD server is behind a DNS round-robin or geographically
diverse servers.
On a hunch that there is one misconfigured server, dump the IP that we
connected to.
(From OE-Core rev: 91f46d431dc8f40e8c6475c800bb61cb08b82b0a)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/meta/cve-update-db-native.bb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb index 079f062f79..e042e67b09 100644 --- a/meta/recipes-core/meta/cve-update-db-native.bb +++ b/meta/recipes-core/meta/cve-update-db-native.bb | |||
@@ -130,7 +130,10 @@ def update_db_file(db_tmp_file, d): | |||
130 | response = urllib.request.urlopen(meta_url, timeout=cve_socket_timeout) | 130 | response = urllib.request.urlopen(meta_url, timeout=cve_socket_timeout) |
131 | except urllib.error.URLError as e: | 131 | except urllib.error.URLError as e: |
132 | cve_f.write('Warning: CVE db update error, Unable to fetch CVE data.\n\n') | 132 | cve_f.write('Warning: CVE db update error, Unable to fetch CVE data.\n\n') |
133 | bb.warn("Failed to fetch CVE data (%s)" % e.reason) | 133 | bb.warn("Failed to fetch CVE data (%s)" % e) |
134 | import socket | ||
135 | result = socket.getaddrinfo("nvd.nist.gov", 443, proto=socket.IPPROTO_TCP) | ||
136 | bb.warn("Host IPs are %s" % (", ".join(t[4][0] for t in result))) | ||
134 | return False | 137 | return False |
135 | 138 | ||
136 | if response: | 139 | if response: |