[Networkmanager] [CONCHECK] Intercept policy change
Marcos Paulo Serafim
mps at mps.eti.br
Wed Oct 18 11:37:38 UTC 2023
Hi,
Thanks for the info, this helps me a lot.
Best regards,
- -
Marcos Paulo Serafim
----- Mensagem original -----
De: "Beniamino Galvani" <bgalvani at redhat.com>
Para: "Marcos Paulo Serafim" <mps at mps.eti.br>
Cc: "networkmanager" <networkmanager at lists.freedesktop.org>
Enviadas: Quarta-feira, 18 de outubro de 2023 4:21:13
Assunto: Re: [Networkmanager] [CONCHECK] Intercept policy change
On Fri, Oct 13, 2023 at 06:36:43PM -0300, Marcos Paulo Serafim wrote:
> Hi,
>
> Is it possible to intercept CONCHECK policy change events via DBUS signals or DISPATCH ?
Hi,
the global connectivity state is exported via D-Bus through the
"Connectivity" property on the Manager object:
https://networkmanager.dev/docs/api/latest/gdbus-org.freedesktop.NetworkManager.html#gdbus-property-org-freedesktop-NetworkManager.Connectivity
This is the state obtained by combining all devices' connectivity
states. When this property changes, the dispatcher event
'connectivity-change' is also triggered; you can intercept it by
using a dispatcher script:
https://networkmanager.dev/docs/api/latest/NetworkManager-dispatcher.html
> It seems to me that the change of default routing metrics is not signaled.
I suppose you are referring to the mechanism that penalizes devices
without connectivity by bumping their route metric. Since the property
and event mentioned above are about the global connectivity state,
they don't change if the global state doesn't change.
So, if you have two devices and one gets the metric penalty while the
other still has connectivity, there will be no change in global state.
If you are interested in the connectivity state of each device, you
can monitor the following D-Bus properties:
https://networkmanager.dev/docs/api/latest/gdbus-org.freedesktop.NetworkManager.Device.html#gdbus-property-org-freedesktop-NetworkManager-Device.Ip4Connectivity
https://networkmanager.dev/docs/api/latest/gdbus-org.freedesktop.NetworkManager.Device.html#gdbus-property-org-freedesktop-NetworkManager-Device.Ip6Connectivity
Beniamino
More information about the Networkmanager
mailing list