Go to file
Thiago Macieira 83876c0256 QNetworkInterface/Unix: fix DNS eligibility of global addresses
[ChangeLog][QtNetwork][QNetworkInterface] Fixed the reporting the "DNS
eligibility" factor (QNetworkAddressEntry::dnsEligibility) for global IP
addresses. Previously, QNetworkInterface interface erroneously reported
all global addresses as eligible, regardless of whether they had already
been deprecated by the OS or were temporary in the first place.

From the tst_QNetworkInterface::dump output (netmask & broadcast
suppressed for readability, IPv6 prefixes changed to protect the
innocent, but the local part is exactly as found on my system):

   address  0: 192.168.26.33/24  dns-eligible preferred:33546998ms valid:33546998ms
   address  1: 2001:db8::800/128  dns-eligible preferred:264817000ms valid:264817000ms
   address  2: fd00::800/128  dns-eligible preferred:forever valid:forever
   address  3: 2001:db8::2f5b:342c:fc53:b9b2/64  dns-ineligible preferred:12422000ms valid:264817000ms
   address  4: fd00::9351:adff:333d:5c8d/64  dns-ineligible preferred:12421999ms valid:531402999ms
   address  5: fd00::7297:9516:fbb4:17ac/64  dns-ineligible preferred:0ms valid:445585999ms
   address  6: fd00::fdc8:e620:691:3b44/64  dns-eligible preferred:forever valid:forever
   address  7: 2001:db8::ae82:a01:5a8a:e210/64  dns-ineligible preferred:0ms valid:264816999ms
   address  8: 2001:db8::c673:e0a2:8927:2118/64  dns-eligible preferred:264816999ms valid:264816999ms
   address  9: fe80::bd89:b998:4aeb:a5d0%bond0/64  dns-ineligible preferred:forever valid:forever

Prior to this commit, only address 9 was showing as ineligible.

Addresses 1 and 2 come from DHCPv6 and are thus always eligible.
Addresses 3, 4, 5, and 7 are temporary addresses added on account of
RFC 4941 and are therefore ineligible (they have the IFA_F_TEMPORARY
flag set). Note how 5 and 7 have also stopped being preferred. Address 3
is the one I see when I go to ip6.me and address 4 is the one used to
reach the router.

Addresses 6, 8, and 9 are the "permanent" addresses that would normally
be based on the MAC address of the interface, but are actually in
"stable privacy" mode for me (RFC 8064). Address 9 is the link-local
one, which makes it ineligible, leaving the other two stable addresses
eligible.

Addresses 1, 3, 7, and 8 are global, from a DHCPv6-PD delegation from my
ISP, which is why they have finite lifetime. Addresses 2, 4, 5, and 6
are from my local Unique Local Address (ULA) prefix, which is why 2 and
6 are valid forever.

Pick-to: 6.1
Change-Id: If8b43dc9678c4b4ba9c1fffd1668fdcae873c6bd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-03-05 13:56:31 -08:00
.github/workflows Github Actions: many minor updates 2021-01-22 18:48:54 +01:00
bin Move syncqt.pl to libexec 2021-03-04 09:56:07 +01:00
cmake Merge "Fix build of Core module without regularexpression feature" 2021-03-04 13:32:07 +00:00
coin Allow disabling module build and building of tests per module 2021-02-19 16:28:06 +02:00
config.tests Remove the qmake project files 2021-01-07 15:32:28 +01:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Offline documentation CSS: Remove external link icon from video links 2021-02-19 08:49:12 +00:00
examples imageviewer example: Show the color space description when loading 2021-03-05 17:35:25 +01:00
lib
libexec Move syncqt.pl to libexec 2021-03-04 09:56:07 +01:00
mkspecs Move syncqt.pl to libexec 2021-03-04 09:56:07 +01:00
qmake Add the 'FEATURE_qmake' feature 2021-03-04 09:49:44 +01:00
src QNetworkInterface/Unix: fix DNS eligibility of global addresses 2021-03-05 13:56:31 -08:00
tests Merge "Fix warning about virtual override" 2021-03-05 18:09:24 +00:00
util configurejson2cmake: Add library mapping for libmng 2021-02-24 17:10:26 +01:00
.cmake.conf Bump version 2021-02-18 07:20:21 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore .gitignore: Qt Creator files cleanup 2020-09-25 07:50:15 +02:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.prev_configure.cmake Use newlines more consistently in generate compile-test code 2021-02-15 13:45:14 +01:00
.prev_qt_cmdline.cmake CMake: Regenerate configure.cmake files 2020-09-28 15:48:17 +02:00
.qmake.conf Bump version 2021-02-18 07:20:21 +02:00
.tag
CMakeLists.txt Fix double inclusion of QtAutoDetect.cmake in top-level build 2021-03-04 11:31:14 +01:00
config_help.txt Update name of c++2a to c++20 2021-02-10 07:54:06 +01:00
configure Remove qmake-related code from configure 2020-12-21 10:33:33 +01:00
configure.bat Remove qmake-related code from configure 2020-12-21 10:33:33 +01:00
configure.cmake Use newlines more consistently in generate compile-test code 2021-02-15 13:45:14 +01:00
configure.json Update name of c++2a to c++20 2021-02-10 07:54:06 +01:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL
LICENSE.GPL2
LICENSE.GPL3
LICENSE.GPL3-EXCEPT
LICENSE.LGPL3
LICENSE.LGPLv3
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qt_cmdline.cmake Add the 'FEATURE_qmake' feature 2021-03-04 09:49:44 +01:00
sync.profile Generate QUtf8StringView header file from qutf8stringview.h 2020-11-07 08:35:11 +00:00