Go to file
Thiago Macieira 7507d87285 QNetworkInterface/Linux: make the IFLA_OPER_STATE set IsRunning
We were setting IsUp for both the ifinfomsg::ifi_flags field and
IFLA_OPER_STATE message. Turns out the second matches the "RUNNING"
state that ifconfig used to return (IFF_RUNNING from SIOCIFFLAGS).

Example:
$ ip link show vboxnet0
4: vboxnet0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
$ ifconfig vboxnet0
vboxnet0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 0a:00:27:00:00:00  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

In this example, ifconfig is not showing "RUNNING", so its "UP" matches
iproute2's in the <> section (that's the interface's ifi_flags). In an
interface that ifconfig shows RUNNING, iproute2 will show "state UP",
which is the IFLA_OPER_STATE.

Exception: looks like the loopback has IF_OPER_UNKNOWN.

Change-Id: Ic90d8429a0eb4837971dfffd1664bfc3f4b4e030
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-02-18 12:34:17 -08:00
.github/workflows Github Actions: many minor updates 2021-01-22 18:48:54 +01:00
bin CMake: Mark qt-cmake-standalone-test as an executable on Unix 2020-12-04 11:22:38 +01:00
cmake Coin: remove workarounds to allow running Android tests 2021-02-18 13:42:19 +02:00
coin Coin: remove workarounds to allow running Android tests 2021-02-18 13:42:19 +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 Doc: Online CSS: Fix image captions overlapping images used in tables 2021-02-09 12:51:50 +01:00
examples Fix CMake build of network/torrent example 2021-02-15 13:40:08 +00:00
lib
mkspecs qmake: Introduce QT_HOST_LIBEXECS property 2021-02-18 11:46:42 +01:00
qmake qmake: Introduce QT_HOST_LIBEXECS property 2021-02-18 11:46:42 +01:00
src QNetworkInterface/Linux: make the IFLA_OPER_STATE set IsRunning 2021-02-18 12:34:17 -08:00
tests QJsonObject: Fix operator<=() 2021-02-18 11:22:51 +00:00
util Coin: remove workarounds to allow running Android tests 2021-02-18 13:42:19 +02: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 CMake: Bail out if the build dir is symlinked 2020-12-21 13:22:26 +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 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qt_cmdline.cmake Update name of c++2a to c++20 2021-02-10 07:54:06 +01:00
sync.profile Generate QUtf8StringView header file from qutf8stringview.h 2020-11-07 08:35:11 +00:00