From 11dce2d3d116970e8a9082a391c11f7204fdf4b1 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Tue, 4 Jun 2024 13:00:15 +0200 Subject: [PATCH] interface: add get/setter for IP MTU --- pyaoscx/interface.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pyaoscx/interface.py b/pyaoscx/interface.py index 7a745a0..ecf72c5 100644 --- a/pyaoscx/interface.py +++ b/pyaoscx/interface.py @@ -1733,6 +1733,20 @@ def mtu(self, new_mtu): "Interface {0} has not MTU attribute".format(self.name) ) + @property + def ip_mtu_value(self): + return "1500" if self.ip_mtu is None else self.ip_mtu + + @ip_mtu_value.setter + def ip_mtu_value(self, new_ip_mtu): + """ + Set the IP MTU value + + :param ip_mtu: new IP MTU value + """ + self.user_config["mtu"] = new_ip_mtu + self.ip_mtu = new_ip_mtu + @property def lacp_mode(self): return self.lacp if self.lacp is not None else "disabled"