diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-24 18:04:17 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-24 18:10:48 +0200 |
commit | d77f68ef3198cff019e1e2d74dfe2290800a1ea6 (patch) | |
tree | da3be3377968d9f4c242c0dfb5aa2421ecf7fbc8 /src/conf_mode/interface-wireguard.py | |
parent | 6b828200e698dbff5a3ee61a0c6c9906b0a8493f (diff) | |
download | vyos-1x-d77f68ef3198cff019e1e2d74dfe2290800a1ea6.tar.gz vyos-1x-d77f68ef3198cff019e1e2d74dfe2290800a1ea6.zip |
Python/ifconfig: T1557: refactor 'mtu' property to get_mtu()/set_mtu()
Diffstat (limited to 'src/conf_mode/interface-wireguard.py')
-rwxr-xr-x | src/conf_mode/interface-wireguard.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/conf_mode/interface-wireguard.py b/src/conf_mode/interface-wireguard.py index 4ae3251fe..069298265 100755 --- a/src/conf_mode/interface-wireguard.py +++ b/src/conf_mode/interface-wireguard.py @@ -13,8 +13,6 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# import sys import os @@ -97,7 +95,7 @@ def get_config(): if c.exists(ifname + ' mtu'): config_data[ifname]['mtu'] = c.return_value(ifname + ' mtu') if c.exists(ifname + ' private-key'): - config_data[ifname]['pk'] = "{0}/{1}/private.key".format(kdir,c.return_value(ifname + ' private-key')) + config_data[ifname]['pk'] = "{0}/{1}/private.key".format(kdir,c.return_value(ifname + ' private-key')) if c.exists(ifname + ' peer'): for p in c.list_nodes(ifname + ' peer'): if not c.exists(ifname + ' peer ' + p + ' disable'): @@ -204,10 +202,10 @@ def apply(c): # interface MTU if c[ifname]['mtu'] != 1420: - intfc.mtu = int(c[ifname]['mtu']) + intfc.set_mtu(int(c[ifname]['mtu'])) else: # default is set to 1420 in config_data - intfc.mtu = int(c[ifname]['mtu']) + intfc.set_mtu(int(c[ifname]['mtu'])) # ifalias for snmp from description descr_eff = c_eff.return_effective_value(ifname + ' description') |