summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-wireless.py
AgeCommit message (Collapse)Author
2020-10-01wireless: T2653: mangle RADIUS default valuesChristian Poessinger
With commit 38ae3032 ("pppoe-server: T2936: move to get_config_dict()") there are now RADIUS default values present in the XML definitions - those must be proberly mangled for the WiFi interface.
2020-09-24wireless: T2241: add "wds" CLI optionChristian Poessinger
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-16wireless: T2887: Jinja2 can not work on keys starting with a numberChristian Poessinger
... an error would be presented: jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got 'mhz_incapable', thus we simply rename the key before rendering the template.
2020-08-31configd: T2582: add scripts to include list for daemonJohn Estabrook
2020-07-25ifconfig: T2653: make ifname an optional argument to get_interface_dict()Christian Poessinger
Further reduce the boiler-plate code to determine interface tag node or not. It can be passed into get_interface_dict() if explicitly required - else it is taken from the environment.
2020-07-25wireless: ifconfig: T2653: move to get_config_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-05-29Merge pull request #439 from thomas-mangin/T2088-explicit-airbagChristian Poessinger
airbag :T2088: make airbag explicit
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-26dhcpv6-pd: T2506: add option to request specific prefix lengthChristian Poessinger
Some ISPs (e.g. Comcast) only delegate a /64 by default. You have to explicitly "ask" for a bigger (e.g. /60) prefix. This commit adds a CLI node to request a specific prefix length in the range 32 - 64. dhcpv6-options { prefix-delegation { length 60 } }
2020-05-26dhcpv6-pd: pppoe: T2506: restructure CLIChristian Poessinger
Rename the CLI nodes for prefix delegation from "dhcpv6-options delegate <interface>" to "dhcpv6-options prefix-delegation interface <interface>". The change is required to add the possibility to request for specific prefix sized via the CLI. That option was not possible with the old configuration tree.
2020-05-21wireless: T1627: remove get_conf_file()Christian Poessinger
2020-05-19dhcpv6-pd: T421: support ethernet based interfacesChristian Poessinger
Add support for prefix delegation when receiving the prefix via ethernet, bridge, bond, wireless.
2020-05-19configdict: T2372: interfaces must reuse interface_default_dataChristian Poessinger
This is to remove the amount of duplicated entries in dictionaries. It's one more part to move to a unified interface management.
2020-05-11wireless: T2449: set accept_ra on wireless interfacesJernej Jakob
2020-05-07wireless: T2427: migrate to use common configdict and vlan functionsJernej Jakob
Other interfaces were previously migrated, but this one was forgotten, causing a commit error: File "/usr/libexec/vyos/conf_mode/interfaces-wireless.py", line 621, in verify verify_vlan_config(wifi) File "/usr/lib/python3/dist-packages/vyos/ifconfig_vlan.py", line 155, in verify_vlan_config for vif in config['vif'].values(): AttributeError: 'list' object has no attribute 'values'
2020-05-04wireless: 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-04wireless: T2241: fix falling out of bridge when changing settingsJernej Jakob
Previously, set_vrf was always called, which uses the same master and nomaster commands as bridge, so it removed the interface from the bridge. - add checks to make VRF and bridge membership mutually exclusive
2020-05-04wireless: T2241: make address and bridge membership mutually exclusiveJernej Jakob
Bridge members should not have any addresses assigned.
2020-05-04wireless: T2241: make VRF and bridge membership mutually exclusiveJernej Jakob
2020-05-04validate: T2241: rewrite is_bridge_member to generic is_memberJernej Jakob
- rewrite the function to support both bridge and bonding interface types, if the type is passed it searches only that type, otherwise it searches both - move is_member check out of the deleted condition - move is_member check to intf_from_dict for interfaces that use it
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-23interfaces: T2362: delete and re-add all EUI64 addresses if MAC has changedJernej Jakob
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-19bridge: T2232: move helper to vyos.validateChristian Poessinger
2020-04-17wireless: T2306: Add new cipher suites to the WiFi configurationAlain Lamar
Yet, VyOS knows these two encryption schemes for WiFi: 1. CCMP = AES in Counter mode with CBC-MAC (CCMP-128) 2. TKIP = Temporal Key Integrity Protocol These encryption schemes are new and especially the Galois counter mode cipher suites are very desirable! 1. CCMP-256 = AES in Counter mode with CBC-MAC with 256-bit key 2. GCMP = Galois/counter mode protocol (GCMP-128) 3. GCMP-256 = Galois/counter mode protocol with 256-bit key CCMP is supported by all WPA2 compatible NICs, so this remains the default cipher for bidirectional and group packets while using WPA2. Use 'iw list' to figure out which cipher suites your cards support prior to configuring other cipher suites than CCMP. AP NICs and STA NICs must both support at least one common cipher in a given list in order to associate successfully.
2020-04-13wireless: T2185: add wrongly removed argument to get_conf_file()Christian Poessinger
Commit c0629296bb ("wireless: T2185: migrate from SysVinit to systemd") remove a required argument to get_conf_file()
2020-04-12template: T2230: use render to generate templatesThomas Mangin
convert all call to jinja to use template.render
2020-04-12wireless: T2185: migrate from SysVinit to systemdChristian Poessinger
2020-04-12vyos.util: rename chmod_x() -> chmod_755()Christian Poessinger
2020-04-12wireless: T1627: typo bugfix for VLAN interfacesDavide Beatrici
The typos cause the configurator to throw an exception when a wireless VLAN is specified: Traceback (most recent call last): File "/usr/libexec/vyos/conf_mode/interfaces-wireless.py", line 1463, in <module> apply(c) File "/usr/libexec/vyos/conf_mode/interfaces-wireless.py", line 1433, in apply vlan = e.add_vlan(vif['id']) NameError: name 'e' is not defined
2020-04-11wireless: T2213: bugfix: Use ieee80211n and ieee80211ac if require_vht not setAlain Lamar
Use WiFi modes ieee80211ac and ieee80211n if VHT capabilities are optional. ieee80211n = 1 ieee80211ac = 1 Use only ieee80211ac if VHT capabilities are required (ieee80211n=0). ieee80211ac = 1 ieee80211n = 0 require_vht = 1 In order to make this decision, the desired WiFi operation mode needs to be known. Therefore, we must require users to set the WiFi mode. mode = (a|b|g|n|ac)
2020-04-11dhcp: T2265: refactor DHCP classThomas Mangin
Break the code between v4 and v6, remove need for getter/setter as they are just exposing the underlying dict. Move FixedDict from tunnel code and expose it to other part so it can be used to prevent accidental change to the dhcp option if no default exists already.
2020-04-08vyos-util: rename chown_file() > chown()Christian Poessinger
... to make it clear also directories can be chown(-ed)
2020-04-08bridge: T2232: bugfix wifi and wwan verify() sectionChristian Poessinger
Commit fcce471 ("bridge: T2232: prevent deletion of enslaved interfaces") added a regression by referencing a wrong variable name.
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-06util: T2226: rewrite wireless to use run (should be cmd)Thomas Mangin
cmd is not used as with not wireless adaptor wireless testing fails
2020-04-05wireless: T2212: bugfix for BF-ANTENNA and SOUNDING-DIMENSION flagsalainlamar
VHT flags deal with many variables which depend on antenna count and supported features. BF-ANTENNA-(2|3|4) and SOUNDING-DIMENSION-(2|3|4) were not dealt with correctly. IEEE 802.11ac (VHT) supports at least 1 antenna and up to 8 antennas at most. The hsotapd VHT flags may support as many but most do not. Therefore, we need to be picky here...
2020-04-05wireless: T1627: add imports from netaddrChristian Poessinger
Commit 3d978249b313 ("wireless: T1627: move Jinja2 templates to data/templates folder") remove a wildcard import statement which is required for MAC address modification for the AP.
2020-04-05wireless: T1627: add missing importChristian Poessinger
Commit 3d978249b313c ("wireless: T1627: move Jinja2 templates to data/templates folder") made use of a new library function (chown_file) from vyos.util, unfortunately the required import was somehow not added into the patch.
2020-04-04wireless: T1627: move Jinja2 templates to data/templates folderChristian Poessinger
2020-04-04Merge pull request #303 from alainlamar/T2211Christian Poessinger
wireless: T2211: bugfix: vht_oper_chwidth was not set in hostapd config
2020-04-04wireless: T2211: bugfix: Bugfix for the bugfix: set no defaultsAlain Lamar
When any defaults are set, VHT capabilities are automatically assumed for all WiFi modes which does not match the reality. Therefore we must leave this undefined by default.
2020-04-04wireless: T2211: bugfix: vht_oper_chwidth was not set in hostapd configAlain Lamar
When operating in certain modes, channel width must be configured for WiFi interfaces. The hostapd config does this in two separate lines which must both be configured: vht_oper_chwidth=(0|1|2|3) vht_capab+=[VHT160] for 160MHz in one block or vht_capab+=[VHT160-80PLUS80] for 160MHz as 2x 80MHz in two separate blocks.
2020-04-04wireless: T2208: bugfix: errors in the XML and Python fileAlain Lamar
Commits to "interfaces wireless wlanX capabilities vht link-adaptation (unsolicited|both)" always failed.
2020-03-30wireless: T2151: support phys that provide multiple mac addressesChristian Poessinger
A user reported a PHY that provides two consecutive MAC addresses, this case has been added as I was not aware of such cards. As we manipulate the MAC address anyways its safe to take only the first one.
2020-03-29vyos.util: increase usage of process_running() and remove duplicated codeChristian Poessinger
OpenVPN, WIFI, SSTP all had the same boiler plate copied about checking if a process associated with a pidfile is running or not. This has been migrated to the common library function vyos.util.process_running().
2020-03-28ifconfig: T2057: Do not set empty hw_id macThomas Mangin
set_mac is validating the mac address passed, therefore passing empty string will cause it to fail. if the hardware id could not be found then it should not be attempted to be set