Age | Commit message (Collapse) | Author |
|
In some cases, we need to wait until local address is assigned.
And only then l2tpv3 tunnel can be configured.
For example when ipv6 address is in "tentative" state
or we wait for some routing daemon/route for a remote address.
|
|
It is easier to backport the entire vyos.ifconfig library from 1.4 instead of
backporting single pieces which are required to add new feature to the tunnel
interface section.
In addition that both libraries are now back in sync it will become much easier
to backport any other new feature introduced in VyOS 1.4!
|
|
When a VIF/VLAN interface is placed in admin down state but the lower
interface, serving the vlan, is moved from admin down -> admin up, all its
vlan interfaces will be placed in admin up state, too.
This is bad as a VLAN interface will become admin up even if its specified as
admin down after a reboot.
To reproduce:
set interfaces ethernet eth1 vif 20 disable
set interfaces ethernet eth1 disable
commit
delete interfaces ethernet eth1 disable
commit
Now check the interface state and it returns UP,LOWER_UP
7: eth1.20@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:50:56:b3:09:07 brd ff:ff:ff:ff:ff:ff
inet6 fe80::250:56ff:feb3:907/64 scope link
valid_lft forever preferred_lft forever
(cherry picked from commit 49bc3f1e3ff8416908fc986bb60b444a75a1722d)
|
|
|
|
A lot of derived classes from Interface implemented their own get_config()
method which more or less was the same everywhere. We also hat different
qualifiers like @staticmethod or @classmethod.
This is now changed to only have the @classmethod in Interface base class which
will return the necessary dictionary keys for the required interfaces. This
change is a mid reduction in lines of code which is always a very nice thing!
|
|
Instead of using an Adapter pattern to make interfaces VLAN-aware, create a
derived class named VLANIf to represent a VLAN. This change was necessary to
eliminate mixed code in Interfaces class which was VLAN - free, but recently
gained some VLAN specific code for set_admin_state().
In addition this "autoresolves" the issue in T2894 as a bond vlan interface
will no longer change the lower interface.
|
|
Commit b5310b0 ("ifconfig: l2tpv3: T1823: fix configuration build syntax") did
not cover all parts of the l2tpv3 config. Some parts when e.g. adjusting
l2tpv3 addresses after the tunnel was created did fail with the same error.
This has been fixed.
|
|
Fixes reference to unspecified variable
Traceback (most recent call last):
File "/usr/libexec/vyos/conf_mode/interfaces-l2tpv3.py", line 245, in <module>
apply(c)
File "/usr/libexec/vyos/conf_mode/interfaces-l2tpv3.py", line 211, inapply
l = L2TPv3If(l2tpv3['intf'], **conf)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 185, in __init__
self._create()
File "/usr/lib/python3/dist-packages/vyos/ifconfig/l2tpv3.py", line 48, in _create
cmd = 'ip l2tp add tunnel tunnel_id {} '.format(config['tunnel_id'])
NameError: name 'config' is not defined
|
|
Commit 8a4dd6c2816 ("ifconfig: T2057: add class Register") added the interface
options but not all have been migrated. The forgotten ones have been
added by this commit (session_id & peer_session_id).
|
|
The Interface get_state/set_state were not clear about
if they edited the admin or operational state.
functions are now using admin_state and oper_state
for clarity.
|
|
|
|
__init__ should be added to a derived class only if it does work in the ctor.
|
|
|