summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2024-08-02Merge pull request #3927 from jestabro/nat64-check-kmodDaniil Baturin
nat64: T6627: call check_kmod within standard config function
2024-08-02nat64: T6627: call check_kmod within standard config functionJohn Estabrook
Functions called from config scripts outside of the standard functions get_config/verify/generate/apply will not be called when run under configd. Move as appropriate for the general config script structure and the specific script requirements.
2024-08-01Merge pull request #3923 from c-po/console-T3334Christian Breunig
console: T3334: remove unused directories imported from vyos.defaults
2024-08-01Merge pull request #3221 from lucasec/t5873Christian Breunig
T5873: ipsec remote access VPN: support VTI interfaces.
2024-08-01console: T3334: remove unused directories imported from vyos.defaultsChristian Breunig
2024-08-01Merge pull request #3903 from lucasec/ipsec-remote-access-profileChristian Breunig
T6617: T6618: vpn ipsec remote-access: fix profile generators
2024-07-31ipsec: T6148: Removed unused imports (#3915)aapostoliuk
Removed unused pprint module
2024-07-30Merge pull request #3747 from sever-sever/T6486Christian Breunig
T6486: T6379: Rewrite generate openvpn client-config
2024-07-30Merge pull request #3698 from talmakion/bugfix/T3334Christian Breunig
system: op-mode: T3334: allow delayed getty restart when configuring serial ports
2024-07-30system: op-mode: T3334: allow delayed getty restart when configuring serial ↵Andrew Topp
ports * Created op-mode command "restart serial console" * Relocated service control to vyos.utils.serial helpers, used by conf- and op-mode serial console handling * Checking for logged-in serial sessions that may be affected by getty reconfig * Warning the user when changes are committed and serial sessions are active, otherwise restart services as normal. No prompts issued during commit, all config gen/commit steps still occur except for the service restarts (everything remains consistent) * To apply committed changes, user will need to run "restart serial console" to complete the process or reboot the whole router * Added additional flags and target filtering for generic use of helpers.
2024-07-30Merge pull request #3883 from c-po/vrf-conntrackChristian Breunig
vrf: T6603: conntrack ct_iface_map must only contain one entry for iifname/oifname
2024-07-30T6617: T6618: vpn ipsec remote-access: fix profile generatorsLucas Christian
2024-07-30pbr: T6430: refactor to use vyos.utils.network.get_vrf_tableid()Christian Breunig
Commit 452068ce78 ("interfaces: T6592: moving an interface between VRF instances failed") added a similar but more detailed implementation of get_vrf_table_id() that was added in commit adeac78ed of this PR. Move to the common available implementation.
2024-07-30pbr: T6430: Allow forwarding into VRFs by name as well as route table IDsAndrew Topp
* PBR can only target table IDs up to 200 and the previous PR to extend the range was rejected * PBR with this PR can now also target VRFs directly by name, working around targeting problems for VRF table IDs outside the overlapping 100-200 range * Validation ensures rules can't target both a table ID and a VRF name (internally they are handled the same) * Added a simple accessor (get_vrf_table_id) for runtime mapping a VRF name to table ID, based on vyos.ifconfig.interface._set_vrf_ct_zone(). It does not replace that usage, as it deliberately does not handle non-VRF interface lookups (would fail with a KeyError). * Added route table ID lookup dict, global route table and VRF table defs to vyos.defaults. Table ID references have been updated in code touched by this PR. * Added a simple smoketest to validate 'set vrf' usage in PBR rules
2024-07-29vyos.configtree: T6620: allow list_nodes() to work on non-existent pathsDaniil Baturin
and return an empty list in that case (handy for migration scripts and the like)
2024-07-29Merge pull request #3804 from HollyGurza/T6362Daniil Baturin
T6362: Create conntrack logger daemon
2024-07-29Merge pull request #3823 from srividya0208/T6571Daniil Baturin
OpenVPN CLI-option: T6571: rename ncp-ciphers with data-ciphers
2024-07-30firewall: T4694: incomplete node checks in migration scriptAndrew Topp
This patch on #3616 will only attempt to fix ipsec matches in rules if the firewall config tree passed to migrate_chain() has rules attached.
2024-07-28ipsec: T6148: Fixed reset command by adding init after terminating (#3763)aapostoliuk
Strongswan does not initiate session after termination via vici. Added an CHILD SAs initialization on the initiator side of the tunnel.
2024-07-28firewall: T4694: Adding rt ipsec exists/missing match to firewall configs ↵talmakion
(#3616) * Change ipsec match-ipsec/none to match-ipsec-in and match-none-in for fw rules * Add ipsec match-ipsec-out and match-none-out * Change all the points where the match-ipsec.xml.i include was used before, making sure the new includes (match-ipsec-in/out.xml.i) are used appropriately. There were a handful of spots where match-ipsec.xml.i had snuck back in for output hooked chains already (the common-rule-* includes) * Add the -out generators to rendered templates * Heavy modification to firewall config validators: * I needed to check for ipsec-in matches no matter how deeply nested under an output-hook chain(via jump-target) - this always generates an error. * Ended up retrofitting the jump-targets validator from root chains and for named custom chains. It checks for recursive loops and improper IPsec matches. * Added "test_ipsec_metadata_match" and "test_cyclic_jump_validation" smoketests
2024-07-26T5873: vpn ipsec: ignore dhcp/vti settings when connection disabledLucas Christian
2024-07-26T5873: vpn ipsec: re-write of ipsec updown hookLucas Christian
2024-07-26vrf: T6603: improve code runtime when retrieving info from nftables vrf zoneChristian Breunig
2024-07-26vrf: T6603: conntrack ct_iface_map must only contain one entry for ↵Christian Breunig
iifname/oifname When any of the following features NAT, NAT66 or Firewall is enabled, for every VRF on the CLI we install one rule into nftables for conntrack: chain vrf_zones_ct_in { type filter hook prerouting priority raw; policy accept; counter packets 3113 bytes 32227 ct original zone set iifname map @ct_iface_map counter packets 8550 bytes 80739 ct original zone set iifname map @ct_iface_map counter packets 5644 bytes 67697 ct original zone set iifname map @ct_iface_map } This is superfluous.
2024-07-25op_mode: T5744: PKI import OpenVPN shared key includess unexpected BEGIN and ENDNataliia Solomko
2024-07-25OpenVPN CLI-option: T6571: rename ncp-ciphers with data-cipherssrividya0208
2024-07-25T6605: restore configd error formatting to be consistent with CLI (#3868)John Estabrook
2024-07-24Merge pull request #3856 from c-po/verify-vrfChristian Breunig
vrf: T6602: verify supplied VRF name on all interface types
2024-07-24Merge pull request #3860 from natali-rs1985/T6596-currentChristian Breunig
op_mode: T6596: pppoe operation command failed
2024-07-24Merge pull request #3853 from natali-rs1985/T5552-currentChristian Breunig
system_option: T5552: Apply IPv4 and IPv6 options after reapplying sysctls by TuneD
2024-07-24op_mode: T6596: pppoe operation command failedNataliia Solomko
2024-07-23vrf: T6602: verify supplied VRF name on all interface typesChristian Breunig
Only some (e.g. ethernet or wireguard) interfaces validate if the supplied VRF actually exists. If this is not validated, one can pass an invalid VRF to the system which generates an OSError exception. To reproduce set interfaces vxlan vxlan1 vni 1000 set interfaces vxlan vxlan1 remote 1.2.3.4 set interfaces vxlan vxlan1 vrf smoketest results in OSError: [Errno 255] failed to run command: ip link set dev vxlan1 master smoketest_mgmt This commit adds the missing verify_vrf() call to the missing interface types and an appropriate smoketest for all interfaces supporting VRF assignment.
2024-07-23system_option: T5552: Apply IPv4 and IPv6 options after reapplying sysctls ↵Nataliia Solomko
by TuneD
2024-07-22Merge pull request #3840 from HollyGurza/T6589Christian Breunig
T6589: Return a dict when querying information about a single interface
2024-07-22Merge pull request #3827 from HollyGurza/T6525Christian Breunig
T6525: Add default dir for ext-scripts without absolute path
2024-07-22T5873: vpn ipsec remote-access: support VTI interfacesLucas Christian
2024-07-22Merge pull request #3850 from c-po/openvpn-totp-T3834Christian Breunig
openvpn: T3834: verify() is not allowed to change anything on the system
2024-07-22Merge pull request #3839 from c-po/unused-importsChristian Breunig
vrf: T6592: remove unused import get_interface_config
2024-07-22T6587: Raise an error when trying to get information about network ↵khramshinr
interfaces that don't exist
2024-07-22openvpn: T3834: verify() is not allowed to change anything on the systemChristian Breunig
Commit e3c71af1466 ("remove secrets file if the tunnel is deleted and fix opmode commands") added a code path into verify() which removed files on the system if TOTP was not defined. This commit moves the code path to the appropriate generate() function.
2024-07-22Merge pull request #3833 from c-po/wifi-fixChristian Breunig
wireless: T6597: improve hostapd startup and corresponding smoketests
2024-07-22T6599: ipsec: fix incorect default behavior for dead-peer-detectionLucas Christian
2024-07-22T6589: Return a dict when querying information about a single interfacekhramshinr
2024-07-21vrf: T6592: remove unused import get_interface_configChristian Breunig
Remove unused import (left over) from commit 36f3791e0 ("utils: migrate to new get_vrf_tableid() helper")
2024-07-20utils: migrate to new get_vrf_tableid() helperChristian Breunig
Commit 452068ce7 ("interfaces: T6592: moving an interface between VRF instances failed") introduced a new helper to retrieve the VRF table ID from the Kernel. This commit migrates the old code path where the individual fields got queried to the new helper vyos.utils.network.get_vrf_tableid().
2024-07-20wireless: T6597: improve hostapd startup and corresponding smoketestsChristian Breunig
This was found during smoketesting as thoase started to repeadingly fail in the last weeks File "/usr/libexec/vyos/tests/smoke/cli/test_interfaces_wireless.py", line 534, in test_wireless_security_station_address self.assertTrue(process_named_running('hostapd')) AssertionError: None is not true Digging into this revealed that this is NOT related to the smoketest coding but to hostapd/systemd instead. With a configured WIFI interface and calling: "sudo systemctl reload-or-restart hostapd@wlan1" multiple times in a short period caused systemd to report: "Jul 18 16:15:32 systemd[1]: hostapd@wlan1.service: Deactivated successfully." According to the internal systemd logic used in our version this is explained by: /* If there's a stop job queued before we enter the DEAD state, we shouldn't act on Restart=, in order to not * undo what has already been enqueued. */ if (unit_stop_pending(UNIT(s))) allow_restart = false; if (s->result == SERVICE_SUCCESS) s->result = f; if (s->result == SERVICE_SUCCESS) { unit_log_success(UNIT(s)); end_state = SERVICE_DEAD;` Where unit_log_success() generates the log message in question. Improve the restart login in the wireless interface script and an upgrade to hostapd solved the issue.
2024-07-19T6525: Add default dir for ext-scripts without absolute pathkhramshinr
2024-07-19Merge pull request #3828 from HollyGurza/T6578Christian Breunig
T6578: Fix unhandled exception in "show openconnect-server sessions"
2024-07-19T6362: Create conntrack logger daemonkhramshinr
2024-07-18openvpn: T6591: deprecate OpenVPN server net30 topology (#3825)Daniil Baturin