check_ethernet.hook: Do not ignore network devices with link
The check_ethernet.hook script ignores devices with the
"cdc_ether" driver, presumably to avoid testing cellular
interfaces. This driver isn't exclusive to cellular devices,
however (nor is it inclusive of all cellular devices). As
such, it is prudent to test such devices if, for example,
they report themselves as currently connected.
There are two downsides to this change: on cellular-equipped
devices, this incurs a time penalty in situations where the
celluar device happens to be connected, since a ping attempt
will be performed there. It also incurs a possible false-
positive in situations where the default gateway or ssh host
is reachable through this alternate interface, however the
chances of this being true are very slim indeed and already
exists since the script doesn't eliminate WiFi devices or
celluar devices that use a driver other than "cdc_ether".
One alternate approach would be to remove the "cdc_ether" test
altogether, which seems risky without properly understanding
the original reasoning, and at best would delay testing by
trying devices that were doomed to fail.
Another alternate approach would be to use the connection
manager, which knows how to successfully discern between
Ethernet and wireless WAN devices. This adds a direct
dependency on the connection manager D-Bus APIs which
probably should not happen here without deeper contemplation.
TEST=Manual: run on a host with a USB-Ethernet interface
that uses the "cdc_ether" driver. Note that the system now
does not restart the connection manager at regular intervals.
Reviewed-by: Chris Sosa <email@example.com>
Tested-by: Paul Stewart <firstname.lastname@example.org>
Commit-Queue: Paul Stewart <email@example.com>
(cherry picked from commit 661c1e7c808158e0b7112f25a6d5409ecd68bb1a)
Reviewed-by: Paul Stewart <firstname.lastname@example.org>
1 file changed