summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-l2tpv3.py
AgeCommit message (Collapse)Author
2023-12-31T5474: establish common file name pattern for XML conf mode commandsChristian Breunig
We will use _ as CLI level divider. The XML definition filename and also the Python helper should match the CLI node. Example: set interfaces ethernet -> interfaces_ethernet.xml.in set interfaces bond -> interfaces_bond.xml.in set service dhcp-server -> service_dhcp-server-xml.in
2023-08-06T5195: move helpers from vyos.validate to vyos.utils packageChristian Breunig
2023-07-15T5195: vyos.util -> vyos.utils package refactoring part #2Christian Breunig
2022-07-15interfaces: T4525: interfaces can not be member of a bridge/bond and a VRFChristian Poessinger
2022-04-25vyos.configdict: T4391: enable get_interface_dict() ti be used with ↵Christian Poessinger
ConfigTreeQuery() When VyOS is booting and an interface is brought up (PPPoE) which requires a user callback script that is executed asynchronously when the interface is up we can not use Config(). The problem is, Config() is not available when the system starts and the initial commit is still processed. We need to move to ConfigTreeQuery() which was build for this exact same purpose. TO reduce side effects and also dependencies on the entire vyos.configdict library the set_level()/get_level() calls got eliminated from within the library. All calls to functions like: * get_removed_vlans() * is_node_changed() * leaf_node_changed() * is_mirror_intf() * ... Now require that the full config path to the node is passed.
2022-04-07qos: T4284: support mirror and redirect on all interface typesChristian Poessinger
2022-03-21qos: T4284: initial XML interface definitions for rewriteChristian Poessinger
2021-02-28l2tpv3: T3366: migrate local-ip and remote-ip CLI optionsChristian Poessinger
Rename CLI options local-ip to source-address and remote-ip to remote to get a consistent CLI experience for the user.
2021-02-28vyos.ifconfig: T1579: remove calls to vyos.ifconfig.Interface.get_config()Christian Poessinger
Interface.get_config() was always a pure helper which exposed a "per interface type" dictionary which was then fed by the caller to create interfaces by iproute2 which required additional options during creation time. Such interfaces had been: * tunnel * vxlan * geneve * macsec * wifi * macvlan / pseudo-ethernet The code was always duplicated to convert from the VyOS CLI based get_config_dict() to a dict which can be used to feed iproute2. This path has been removed and we now always feed in the entire dictionary retrieved by get_config_dict() or in the interfaces case, it's high-level wrapper get_interface_dict() to the interface we wan't to create. This also adds the - personally long awaited - possibility to get rid of the derived tunnel classes for e.g. GRE, IPIP, IPIP6 and so on.
2021-01-21xml: T3239: override default mtu values and remove workaroundsJohn Estabrook
2020-09-26ifconfig: mtu: disallow MTU < 1280 bytes when IPv6 is enabled on the interfaceChristian Poessinger
Using an MTU less then the required 1280 bytes (as per RFC) on an interface where IPv6 is not explicitly disabled by: - set interfaces ethernet eth1 ipv6 address no-default-link-local - not having any other IPv6 address configured Will now trigger a commit error via verify() instead of raising FileNotFoundError!
2020-09-20ifconfig: T2653: remove duplicates of get_config()Christian Poessinger
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!
2020-09-15vyos.configdict: T2515: leaf_node_changed() should return list or NoneChristian Poessinger
2020-08-31configd: T2582: add scripts to include list for daemonJohn Estabrook
2020-07-25l2tpv3: ifconfig: T2653: move implementation to get_interface_dict()Christian Poessinger
The current VyOS CLI parser code written in Python contains a ton of duplicates which I can also hold myself accountable for - or maybe mainly me - depends on the angle of judge.
2020-07-25vyos.util: add common helper to load kernel modulesChristian Poessinger
l2tpv3, wireguard, wirelessmodem, nat all require additional Kernel modules to be present on the system. Each and every interface implemented their own way of loading a module - by copying code. Use a generic function, vyos.util.check_kmod() to load any arbitrary kernel module passed as string or list.
2020-05-29airbag: T2088: explicit enabling of the featureThomas Mangin
airbag must now be explicitly installed. the patch also allow to fully disables the installation of the logging code at setup (and not just installing and doing nothing)
2020-05-11l2tpv3: T2449: set accept_ra=2 if ipv6 address autoconf or dhcpv6 is setJernej Jakob
To make SLAAC and DHCPv6 work when forwarding=1, accept_ra must be 2 (default for accept_ra is 1).
2020-05-04l2tpv3: T2241: cleanup verify sectionJernej Jakob
- make error output more user friendly - replace .format with f-strings - split into lines less than ~80 characters long
2020-05-04l2tpv3: T2241: fix falling out of bridge when changing settingsJernej Jakob
Previously, the interface was always deleted and recreated, which removed it from the bridge. - always re-add the interface back to any bridge it is part of in case it is deleted and recreated
2020-05-04l2tpv3: T2241: make address and bridge membership mutually exclusiveJernej Jakob
Bridge members should not have any addresses assigned.
2020-05-04l2tpv3: T2241: add check for bridge membershipJernej Jakob
2020-04-23Merge pull request #371 from jjakob/ipv6-link-local-fixChristian Poessinger
interfaces: T2362: IPv6 link-local and EUI64 address fixes
2020-04-23interfaces: T2362: add node to delete the default IPv6 link-local addressJernej Jakob
2020-04-23interfaces: T2362: allow setting multiple 'ipv6 address eui64'Jernej Jakob
2020-04-23l2tpv3: T2352: check that the local-ip existsThomas Mangin
2020-04-23interfaces: T2362: add default IPv6 link-local address to make IPv6 workJernej Jakob
2020-04-23interfaces: T2362: split set_ipv6_eui64_address into add and del functionsJernej Jakob
2020-04-19l2tpv3: fix missing "," within default_config_dataChristian Poessinger
Commit 0e19d622a0410 ("bridge: T2232: move helper to vyos.validate") added a new key to the dictionary but missed out the required "," at the end.
2020-04-19bridge: T2232: move helper to vyos.validateChristian Poessinger
2020-04-09util: T2226: os.system was wrongly converted to runThomas Mangin
os.system does print the ouput of the command, run() does not. A new function called call() does the printing and return the error code.
2020-04-07bridge: T2232: prevent deletion of enslaved interfacesChristian Poessinger
Interfaces enslaved to a bridge are not allowed to be deleted. If an interface is deleted from the config but it is still enslaved to a bridge will cause a configuration error on the subsequent boot.
2020-04-07l2tpv3: T1923: switch to formatted strings in verify()Christian Poessinger
2020-04-06util: T2226: covert most calls from os.system to utilThomas Mangin
As little change a possible but the function call The behaviour should be totally unchanged.
2020-03-28ipv6: T1831: migrate eui64 addressing to XML and pythonChristian Poessinger
2020-03-28ipv6: T1831: migrate autoconf nodeChristian Poessinger
Autoconfigure addresses using Prefix Information in Router Advertisements.
2020-03-28ipv6: T1831: use integers over bool in interface configurationChristian Poessinger
2020-03-28ipv6: T1831: migrate forwarding and dup-addr-detect-transmits nodesChristian Poessinger
... to new XML and Python based frontend/backend.
2020-03-28ifconfig: T2057: explicity name state functionsThomas Mangin
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.
2020-03-18l2tpv3: T1923: move kernel module load to helper functionChristian Poessinger
2020-03-03interfaces: T1579: fix c/p error when evaluating ↵Christian Poessinger
os.environ['VYOS_TAGNODE_VALUE'] This has been only a theoretical problem but then the error condition was triggered - only an error has been printed instead of raising an Exception.
2020-02-24ifconfig: T2057: generalised Interface configurationThomas Mangin
Provides a way to pass options to interface consistent between subclasses of Interface
2019-12-31l2tpv3: T1923: support interface deletionChristian Poessinger
2019-12-31l2tpv3: T1923: implementation in XML/PythonChristian Poessinger
Tested using: R1: --- set interfaces l2tpv3 l2tpeth10 address '2001:db8:beef::1/64' set interfaces l2tpv3 l2tpeth10 address '100.0.0.1/24' set interfaces l2tpv3 l2tpeth10 destination-port '3000' set interfaces l2tpv3 l2tpeth10 encapsulation 'udp' set interfaces l2tpv3 l2tpeth10 local-ip '172.18.201.10' set interfaces l2tpv3 l2tpeth10 peer-session-id '10' set interfaces l2tpv3 l2tpeth10 peer-tunnel-id '100' set interfaces l2tpv3 l2tpeth10 remote-ip '172.18.204.10' set interfaces l2tpv3 l2tpeth10 session-id '20' set interfaces l2tpv3 l2tpeth10 source-port '6000' set interfaces l2tpv3 l2tpeth10 tunnel-id '200' R2: --- set interfaces l2tpv3 l2tpeth10 address '2001:db8:beef::2/64' set interfaces l2tpv3 l2tpeth10 address '100.0.0.2/24' set interfaces l2tpv3 l2tpeth10 destination-port '6000' set interfaces l2tpv3 l2tpeth10 encapsulation 'udp' set interfaces l2tpv3 l2tpeth10 local-ip '172.18.204.10' set interfaces l2tpv3 l2tpeth10 peer-session-id '20' set interfaces l2tpv3 l2tpeth10 peer-tunnel-id '200' set interfaces l2tpv3 l2tpeth10 remote-ip '172.18.201.10' set interfaces l2tpv3 l2tpeth10 session-id '10' set interfaces l2tpv3 l2tpeth10 source-port '3000' set interfaces l2tpv3 l2tpeth10 tunnel-id '100'