summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-02Merge pull request #993 from sever-sever/T3788Christian Poessinger
tunnel: T3788: Add check keys for ipip and sit
2021-09-02tunnel: T3788: Add check keys for ipip and sitViacheslav
Keys are not allowed with ipip and sit tunnels
2021-09-02login: T3792: bugfix for usernames containing a hyphenChristian Poessinger
While migrating to get_config_dict() in commit e8a1c291b1 ("login: radius: T3192: migrate to get_config_dict()") the user-name was not excluded from mangling (no_tag_node_value_mangle=True). This resulted in a username "vyos-user" from CLI to be actually created as "vyos_user" on the system. This commit also adds respective Smoketests to prevent this in the future.
2021-09-02login: radius: T3192: drop workaround required by get_config_dict()Christian Poessinger
The workaround is no longer required, as the issue was resolved in get_config_dict() so if it is a <multi/> node, a list is always returned.
2021-09-02op-mode: T1376: speed up tab-completion for DHCP pool listingChristian Poessinger
Commit 9f20bee81c ("T1376: improve show_dhcp and show_dhcpv6") added the tab completion helper to list the availbale IP pools to query. This was done by calling a python script which then called cli-shell-api which resulted in a penalty by the Python interpreter startup. This can be solved by directly using the cli-shell-api wrapper available as <path> in op-mode - as also seen for DHCPv6.
2021-09-02pptp-server: T3790: Change ippool priority and define gw-ip-addressDmitriyEshenko
(cherry picked from commit 23388fe193f04ab05f270098123cbb3e5f0b9f75)
2021-09-01Merge pull request #986 from sever-sever/T2920Christian Poessinger
tunnel: T2920: Add checks tun with same source addr and keys
2021-09-01login: T1948: add missing ssh-public key name regexChristian Poessinger
2021-09-01login: T1948: fix username regex - add missing start ^ and end $Christian Poessinger
2021-09-01tunnel: T2920: Add checks tun with same source addr and keysViacheslav
2 tunnels with the same local-address should has different keys Check existing tunnels (source-address key) with new tunnel.
2021-08-31vyos.ethtool: T3163: ring-buffer values should be stored as stringChristian Poessinger
Commit 29082959 ("ethernet: T3163: only change ring-buffer settings if required") added a delta-check code for the ring buffer values, unfortunately this was never properly evaluated as str() and int() got compared resulting always in an unequal result.
2021-08-31vyos.ethtool: T3163: purify code to read and change flow-control settingsChristian Poessinger
It makes no sense to have a parser for the ethtool values in ethtool.py and ethernet.py - one instance ios more then enough!
2021-08-31op-mode: "show interfaces ethernet eth0 physical" should display ring-buffersChristian Poessinger
2021-08-31ethernet: T3163: only change ring-buffer settings if requiredChristian Poessinger
Only update the RX/TX ring-buffer settings if they are different from the ones currently programmed to the hardware. There is no need to write the same value to the hardware again - this could cause traffic disruption on some NICs.
2021-08-31vyos.ethtool: T3163: purify code to read current speed and duplex settingsChristian Poessinger
It makes no sense to have a parser for the ethtool value sin ethtool.py and ethernet.py - one instance ios more then enough!
2021-08-31ethernet: T2241: check if interface supports changing speed/duplex settingsChristian Poessinger
Not all interface drivers have the ability to change the speed and duplex settings. Known drivers with this limitation are vmxnet3, virtio_net and xen_netfront. If this driver is detected, an error will be presented to the user.
2021-08-31vyos.ethtool: T3163: use long option names when calling the ethtool binrayChristian Poessinger
This makes understanding the code easier what is "really" called without opening the man page.
2021-08-31ssh: T3789: add custom validator for base64 encoded CLI dataChristian Poessinger
SSH keys used for remote login are supplied as base64 encoded data on the CLI. The key is not validated, thus an invalid copy/pasted key will render the login useless. This commit adds a custom and re-usable validator which check if the data is properly base64 encoded.
2021-08-31ethernet: T3514: bail out early on invalid adapter speed/duplex settingChristian Poessinger
Ethernet adapters have a discrete set of available speed and duplex settings. Instead of passing every value down to ethtool and let it decide, we can do this early in the VyOS verify() function for ethernet interfaces.
2021-08-30Merge pull request #984 from sever-sever/T3786Christian Poessinger
tunnel: T3786: Add checks for source any and not key
2021-08-30ethernet: T3787: remove deprecated UDP fragmentation offloading optionChristian Poessinger
Deprecated in the Linux Kernel by commit 08a00fea6de277df12ccfadc21 ("net: Remove references to NETIF_F_UFO from ethtool."). (cherry picked from commit f5e46ee6cc2b6c1c1869e26beca4ccd5bf52b62f)
2021-08-30ethernet: T3619: fix VyOS 1.2 -> 1.3 performance degradationChristian Poessinger
An analysis of the code base from VyOS 1.2 -> 1.3 -> 1.4 revealed the following "root-cause" VyOS 1.2 uses the "old" node.def file format for: * Generic Segmentation Offloading * Generic Receive Offloading So if any of the above settings is available on the configuration CLI, the node.def file will be executed - this is how it works. By default, this CLI option is not enabled in VyOS 1.2 - but the Linux Kernel enables offloading "under the hood" by default for GRO, GSO... which will boost the performance for users magically. With the rewrite in VyOS 1.3 of all the interface related code T1579, and especially T1637 this was moved to a new approach. There is now only one handler script which is called whenever a user changes something under the interfaces ethernet tree. The Full CLI configuration is assembled by get_interface_dict() - a wrapper for get_config_dict() which abstracts and works for all of our interface types - single source design. The problem now comes into play when the gathered configuration is actually written to the hardware, as there is no GSO, GRO or foo-offloading setting defined - we behave as instructed and disable the offloading. So the real bug originates from VyOS 1.2 and the old Vyatta codebase, but the recent XML Python rewrites brought that one up to light. Solution: A configuration migration script will be provided starting with VyOS 1.3 which will read in the CLI configuration of the ethernet interfaces and if not enabled, will query the adapter if offloading is supported at all, and if so, will enable the CLI nodes. One might say that this will "blow" the CLI configuration but it only represents the truth - which was masked in VyOS 1.2. (cherry picked from commit a515212f4efb08846df04405f31a828edcd63552)
2021-08-30ethernet: T3619: rename interfaces migration scriptsChristian Poessinger
VyOS 1.4 already had a migrator for interfaces 20 -> 21, but this is a different one compared to the one in VyOS 1.3 - thus we bump every migration scripts version by one to have the same 20-to-21 converter in both VyOS 1.3 and 1.4. This is possible as VyOS 1.4 (sagitta) is still a highly experimental version and expected to break from time to time :(.
2021-08-30vyos.ifconfig: T3619: only inform user about real offload change for invalid ↵Christian Poessinger
option Commit 31169fa8 ("vyos.ifconfig: T3619: only set offloading options if supported by NIC") added a warning for the user if an offload option was about to change that was not possible at all (harware limit). Unfortunately the warning was even displayed if nothing was done at all. This got corrected.
2021-08-30vyos.ethtool: T3163: remove test and debug method get_rx_vlan_offload()Christian Poessinger
2021-08-30tunnel: T3786: Add checks for source any and not keyViacheslav
2021-08-30config: T2941: ignore unicode characters, e.g., in description fieldJohn Estabrook
2021-08-30Merge pull request #983 from sever-sever/T3782Christian Poessinger
interface: T3782: Fix unexpected delete qdisc rule
2021-08-30interface: T3782: Fix unexpected delete qdisc ruleViacheslav
Some tc qdisc rules are generated by old perl code It prevent to unexpected override this code by python.
2021-08-29vyos.ethtool: T3163: add check_speed_duplex() methodChristian Poessinger
Add a new method which supports checking if the desired speed and duplex setting is actually supported by the underlaying network interface card. >>> from vyos.ethtool import Ethtool >>> tmp = Ethtool('eth0') >>> tmp.check_speed_duplex('100', 'full') False >>> tmp.check_speed_duplex('1000', 'full') True
2021-08-29vyos.ethtool: T3163: prefix class internal data structures with _Christian Poessinger
2021-08-29vyos.ethtool: T3163: drop obsoleted is_fixed_lro() methodChristian Poessinger
Commit d22f97af ("vyos.ethtool: T3163: rename unused methods for offload validation") reworked the entire class on how data should be presented to the user, but forgot to drop the is_fixed_lro() method.
2021-08-29interfaces: T3777: Does not delete empty eui64 addressViacheslav
Check eui64_old value before deleting It can be empty or not ipv6 address. (cherry picked from commit 0de23064b9d575ce0569839e3b4453a0c2e9dc1c)
2021-08-29Merge pull request #982 from zdc/T3763-sagittaChristian Poessinger
wireguard: T3763: Fixed uninitialized port issue
2021-08-29wireguard: T3763: The port availability check fixzsdc
Check a port availability only if it was changed in current commit. This should protect from fail-positive errors when other parameters change for an interface.
2021-08-29wireguard: T3763: Fixed uninitialized port issuezsdc
The commit fixes the problem, when port availability check is triggered even if a port for WireGuard interface is not defined (randomized port, default behavior).
2021-08-29xml: add missing "u32:" value declarator on integer rangesChristian Poessinger
2021-08-29ospf: T3236: remove debug print() statementChristian Poessinger
2021-08-29ospf: T3236: add possibility to redistribute "table"Christian Poessinger
Add new CLI command: * "set protocols ospf redistribute table <n>"
2021-08-29ospf: xml: T3236: update help stringsChristian Poessinger
2021-08-29isis: T3783: bugfix configuring spf-delay-ietfChristian Poessinger
Mandatory FRR options for spf-delay-ietf did not get rendered in the Jinja2 template.
2021-08-28vyos.ifconfig: T3619: only set offloading options if supported by NICChristian Poessinger
In the past we always told ethtool to change the offloading settings, even if this was not supported by the underlaying driver. This commit will only change the offloading options if they differ from the current state of the NIC and only if it's supported by the NIC. If the NIC does not support setting the offloading options, a message will be displayed for the user: vyos@vyos# set interfaces ethernet eth2 offload gro vyos@vyos# commit [ interfaces ethernet eth2 ] Adapter does not support changing large-receive-offload settings!
2021-08-28vyos.ethtool: T3163: rename unused methods for offload validationChristian Poessinger
2021-08-28Merge pull request #980 from zdc/T3763-sagittaChristian Poessinger
wireguard: T3763: Added check for listening port availability
2021-08-27vyos.ifconfig: pppoe: T3778: bugfix assignemnt of cached configChristian Poessinger
We need to copy the configuration before this is done in super().update() as we utilize self.set_dhcpv6() before this is done by the base class.
2021-08-27ipsec: T1210: Jinj2 template did not honor inactivity/timeout settingChristian Poessinger
2021-08-26vyos.util: T3763: Optimized the check_port_availability functionzsdc
`print` was removed or replaced to `ValueError`, where possible.
2021-08-26Merge pull request #965 from c-po/t3739-evpn-route-mapChristian Poessinger
bgp: evpn: T3739: add route-map match support
2021-08-26ipsec: T1210: support road-warrior IP assignment via RADIUS Framed-IP-AddressChristian Poessinger
Extended CLI command: "set vpn ipsec remote-access connection rw pool" with a "radius" option.
2021-08-26op-mode: frr: T1514: add possibility to restart isis daemonChristian Poessinger
(cherry picked from commit b4b2c91127289c7b62afb24304054d57357a48c5)