Mon, May 31, 2021 at 04:23:01PM CEST, olichtne(a)redhat.com wrote:
On Thu, May 27, 2021 at 02:04:29PM +0200, Jan Tluka wrote:
> Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
> ---
> lnst/Devices/VxlanDevice.py | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/lnst/Devices/VxlanDevice.py b/lnst/Devices/VxlanDevice.py
> index 1426d3e2..d3c7c55c 100644
> --- a/lnst/Devices/VxlanDevice.py
> +++ b/lnst/Devices/VxlanDevice.py
> @@ -117,3 +117,13 @@ class VxlanDevice(SoftDevice):
> if val:
> self._set_linkinfo_data_attr("IFLA_VXLAN_COLLECT_METADATA",
True)
> self._nl_link_sync("set")
> +
> + @property
> + def gpe(self):
> + return self._get_linkinfo_data_attr("IFLA_VXLAN_GPE") is not None
> +
> + @gpe.setter
> + def gpe(self, val):
> + if val:
> + self._set_linkinfo_data_attr("IFLA_VXLAN_GPE", True)
> + self._nl_link_sync("set")
what happens if you do this?
gpe = False
an empty nl message is sent to the nl link sync "set" method? And does
this work as intended?
-Ondrej
Hmm, good question. Let me check. I'm not quite sure if it's possible to
reset the flag independently.
And probably, the data attribute should be removed completely if it is
set to False.
Let me check this.
J.