On Mon, 2016-10-31 at 12:31 -0400, Matthew Miller wrote:
On Mon, Oct 31, 2016 at 09:23:06AM -0700, Adam Williamson wrote:
> For that matter, I'm fairly sure I've seen background update
> downloading happen when I was using an Android wifi tether
> connection. I'm pretty sure I remember it blowing my data cap one
> month when I was using my laptop on the bus.
As far as I can see, the default is "unknown". You can set
"CONNECTION_METERED=yes" in the
/etc/sysconfig/network-scripts/ifcfg-[whatever] file to change it on
The man page for NetworkManager.conf doesn't document this as one of
the properties which can have its default overridden (and says that
anything not documented can't be overridden). I took that at its
possibly worth testing anyway. :)
In NetworkManager this works as follows:
(1) There is the per-connection property "connection.metered" . It
can be "yes", "no", "unknown". "unknown" is the
default and prompts NM
to do some basic heuristics.
$ nmcli -f connection.metered connection show $NAME
$ nmcli connection update $NAME connection.metered yes
(2) Then there is the Device's metered property in the D-Bus API .
If you activate a connection that has "connection.metered" explicitly
set to "yes" or "no", that's it.
Otherwise, NM will set the device property to "guess-yes" or "guess-
no". For example,
- WWAN connections are "guess-yes"
- if there is a DHCP option ANDROID_METERED, it is "guess-yes".
$ nmcli -f GENERAL.METERED device show $DEVICE
(3) Finally, there is the Manager's metered property . This combines
the metered property of multiple devices into one. PackageKit would
only care about this
$ busctl get-property org.freedesktop.NetworkManager /org/freedesktop/NetworkManager