<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-1x.git/src/helpers/vyos-failover.py, branch feature/T9082-codeql-cpp</title>
<subtitle>VyOS command definitions, scripts, and utilities (mirror of https://github.com/vyos/vyos-1x.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-1x.git/atom?h=feature%2FT9082-codeql-cpp</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-1x.git/atom?h=feature%2FT9082-codeql-cpp'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/'/>
<updated>2026-03-24T17:02:56+00:00</updated>
<entry>
<title>T8410: Fix typos and mistakes for operational and configuration commands</title>
<updated>2026-03-24T17:02:56+00:00</updated>
<author>
<name>Viacheslav Hletenko</name>
<email>v.gletenko@vyos.io</email>
</author>
<published>2026-03-20T16:41:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=bb2aee1e58c1cd30087b935798060e6bf3c698c8'/>
<id>urn:sha1:bb2aee1e58c1cd30087b935798060e6bf3c698c8</id>
<content type='text'>
Fix typos and mistakes in the commands and comments
No functional changes
</content>
</entry>
<entry>
<title>T5942: Make failover support dhcp-interface</title>
<updated>2025-10-14T12:05:07+00:00</updated>
<author>
<name>Kyrylo Yatsenko</name>
<email>hedrok@gmail.com</email>
</author>
<published>2025-09-26T19:59:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=47d5f21b7770b0b8dcd29272e6c93bea9028adfe'/>
<id>urn:sha1:47d5f21b7770b0b8dcd29272e6c93bea9028adfe</id>
<content type='text'>
* Refactor XML a little: move common dhcp-interface properties to
  separate include file
* Add failover support for dhcp-interface
* Add test for DHCP in failover protocol
</content>
</entry>
<entry>
<title>T7803: Make failover route vrf-aware</title>
<updated>2025-10-08T12:07:59+00:00</updated>
<author>
<name>Kyrylo Yatsenko</name>
<email>hedrok@gmail.com</email>
</author>
<published>2025-09-22T19:10:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=931e5b5712b4fa8b13027291eb21881c40b8a051'/>
<id>urn:sha1:931e5b5712b4fa8b13027291eb21881c40b8a051</id>
<content type='text'>
* Added 'protocol failover' to 'set vrf name':
  set vrf name red protocols failover route 10.11.0.110/32 next-hop 10.0.0.2
* Added vrf and interface to target:
  set ... next-hop 10.0.0.2 check target '10.120.0.21' vrf blue
  set ... next-hop 10.0.0.2 check target '10.120.0.21' interface eth1

Last two are needed when check VRF is not same as route VRF.
In this case icmp can use any/both options, tcp requires `vrf` and
arp requires `interface`
</content>
</entry>
<entry>
<title>T7591: remove copyright years from source files</title>
<updated>2025-06-28T21:16:52+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2025-06-28T18:51:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=1478516ae437f19ebeb7d6ff9b83dd74f8e76758'/>
<id>urn:sha1:1478516ae437f19ebeb7d6ff9b83dd74f8e76758</id>
<content type='text'>
The legal team says years are not necessary so we can go ahead with it, since
it will simplify backporting.

Automatically removed using: git ls-files | grep -v libvyosconfig | xargs sed -i -E \
's/^# Copyright (19|20)[0-9]{2}(-[0-9]{4})? VyOS maintainers.*/# Copyright VyOS maintainers and contributors &lt;maintainers@vyos.io&gt;/g'

In addition we will error-out during "make" if someone re-adds a legacy
copyright notice
</content>
</entry>
<entry>
<title>T5722: Failover route add option onlink</title>
<updated>2024-04-15T15:17:14+00:00</updated>
<author>
<name>Viacheslav Hletenko</name>
<email>v.gletenko@vyos.io</email>
</author>
<published>2024-04-15T15:17:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=bb832acb97881d747a57da2728eab3ad138b8129'/>
<id>urn:sha1:bb832acb97881d747a57da2728eab3ad138b8129</id>
<content type='text'>
onlink pretend that the nexthop is directly attached to this link,
even if it does not match any interface prefix.

Useful when gateway not in the same interface network

set interfaces ethernet eth0 vif 10 address '10.20.30.1/32'
set protocols static route 10.20.30.0/32 interface eth0.10
set protocols failover route 192.0.2.11/32 next-hop 10.20.30.0 onlink

```
vyos@r4# sudo ip route add 192.0.2.111/32 via 10.20.30.0 dev eth0.10 metric 1 proto failover
Error: Nexthop has invalid gateway.
[edit]
vyos@r4#
[edit]
vyos@r4# sudo ip route add 192.0.2.111/32 via 10.20.30.0 dev eth0.10 onlink metric 1 proto failover
[edit]
vyos@r4#
```
</content>
</entry>
<entry>
<title>T6199: drop unused Python imports</title>
<updated>2024-04-02T22:15:43+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2024-04-02T22:15:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=274b2da242acd1f1f64ff1dee471e34295137c5f'/>
<id>urn:sha1:274b2da242acd1f1f64ff1dee471e34295137c5f</id>
<content type='text'>
found using "git ls-files *.py | xargs pylint | grep W0611"
</content>
</entry>
<entry>
<title>T5195: vyos.util -&gt; vyos.utils package refactoring (#2093)</title>
<updated>2023-07-14T20:18:36+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-07-14T20:18:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=d1ca536da448749dff557f13ecae97b124026e96'/>
<id>urn:sha1:d1ca536da448749dff557f13ecae97b124026e96</id>
<content type='text'>
* T5195: move run, cmd, call, rc_cmd helper to vyos.utils.process

* T5195: use read_file and write_file implementation from vyos.utils.file

Changed code automatically using:

find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import read_file$/from vyos.utils.file import read_file/g' {} +
find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import write_file$/from vyos.utils.file import write_file/g' {} +

* T5195: move chmod* helpers to vyos.utils.permission

* T5195: use colon_separated_to_dict from vyos.utils.dict

* T5195: move is_systemd_service_* to vyos.utils.process

* T5195: fix boot issues with missing imports

* T5195: move dict_search_* helpers to vyos.utils.dict

* T5195: move network helpers to vyos.utils.network

* T5195: move commit_* helpers to vyos.utils.commit

* T5195: move user I/O helpers to vyos.utils.io</content>
</entry>
<entry>
<title>T1237: Failover route add policy for targets checking</title>
<updated>2023-04-21T15:34:19+00:00</updated>
<author>
<name>Viacheslav Hletenko</name>
<email>v.gletenko@vyos.io</email>
</author>
<published>2023-04-21T15:34:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=4ab192c7c9d47180560e5d97de23dd1627c8ce11'/>
<id>urn:sha1:4ab192c7c9d47180560e5d97de23dd1627c8ce11</id>
<content type='text'>
Add policy (any-available|all-available) for target checking for failover route

set protocols failover route 192.0.2.55/32 next-hop 192.168.122.1 check policy 'any-available'
set protocols failover route 192.0.2.55/32 next-hop 192.168.122.1 check target '192.168.122.1'
set protocols failover route 192.0.2.55/32 next-hop 192.168.122.1 check target '192.168.122.11'

It depends if we need that all targets must be alive on just one target.
</content>
</entry>
<entry>
<title>T1237: Failover route add checks for multiple targets</title>
<updated>2023-04-07T11:07:11+00:00</updated>
<author>
<name>Viacheslav Hletenko</name>
<email>v.gletenko@vyos.io</email>
</author>
<published>2023-04-06T12:24:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=1a402dd93974840e1039972276e8dbf1cf8694fe'/>
<id>urn:sha1:1a402dd93974840e1039972276e8dbf1cf8694fe</id>
<content type='text'>
There is only one target for checking ICMP/ARP
Extend it for checking multiple targets

set protocols failover route 192.0.2.55/32 next-hop 192.168.122.1 check target '203.0.113.1'
set protocols failover route 192.0.2.55/32 next-hop 192.168.122.1 check target '203.0.113.11'

The route will be installed only if all targets are 'alive'
</content>
</entry>
<entry>
<title>T1237: Fix failover route install route with diff metrics</title>
<updated>2023-01-04T12:05:50+00:00</updated>
<author>
<name>Viacheslav Hletenko</name>
<email>v.gletenko@vyos.io</email>
</author>
<published>2023-01-04T12:05:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=b1004dcd24ba09d51eae2aaabd80b316275d8f88'/>
<id>urn:sha1:b1004dcd24ba09d51eae2aaabd80b316275d8f88</id>
<content type='text'>
If there is no route in the routing table (requires install route)
it checks routing table and returns best route None
But if we have 2 routes to the same dest ip but with different
metrics it doesn't get None (not first route install)
It cause that bast metric route cannot be installed (wrong logic)

Add func "is_route_exists" and check route/gateway/metric for
the required route
</content>
</entry>
</feed>
