<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-1x.git/src/conf_mode/policy_route.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-06-30T15:05:19+00:00</updated>
<entry>
<title>Merge pull request #5254 from jd82k/domain-group</title>
<updated>2026-06-30T15:05:19+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-06-30T15:05:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=cc0d4c4316c8aa297261da659bbb024e0742306c'/>
<id>urn:sha1:cc0d4c4316c8aa297261da659bbb024e0742306c</id>
<content type='text'>
T8963: policy-route: trigger domain resolver for domain groups</content>
</entry>
<entry>
<title>T8963: policy-route: trigger domain resolver for domain groups</title>
<updated>2026-06-08T18:57:28+00:00</updated>
<author>
<name>Miaosen Wang</name>
<email>secretandanon@gmail.com</email>
</author>
<published>2026-06-03T21:31:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=069959a4828c49bced9b82214ebf2b5443c0913e'/>
<id>urn:sha1:069959a4828c49bced9b82214ebf2b5443c0913e</id>
<content type='text'>
Signed-off-by: Miaosen Wang &lt;secretandanon@gmail.com&gt;
</content>
</entry>
<entry>
<title>geoip: T5746: Add GeoIP ASN support</title>
<updated>2026-06-04T14:18:29+00:00</updated>
<author>
<name>sarthurdev</name>
<email>965089+sarthurdev@users.noreply.github.com</email>
</author>
<published>2025-11-28T14:43:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=dffcc04dc143202b412a96ba60867d8509c57e1c'/>
<id>urn:sha1:dffcc04dc143202b412a96ba60867d8509c57e1c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>geoip: T8590: fix initialization failure and set clobbering on boot and commit</title>
<updated>2026-05-19T21:33:48+00:00</updated>
<author>
<name>xTITUSMAXIMUSX</name>
<email>chad@chadhigh.com</email>
</author>
<published>2026-05-01T01:43:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=a263b2b62e72b208fd330f9055aefca29640ff2b'/>
<id>urn:sha1:a263b2b62e72b208fd330f9055aefca29640ff2b</id>
<content type='text'>
Three related bugs prevented GeoIP nftables sets from being populated
correctly at boot and when incrementally modifying firewall or policy
route rules.

1. geoip_updated() always returned False

   The previous implementation called node_changed() and then searched
   the result with dict_search_recursive(changes, 'geoip').  This could
   never match: node_changed() is annotated `-&gt; list` and returns a flat
   list of the immediate top-level child names whose subtree changed
   (e.g. ['ipv4'] for the firewall path, or route names for policy
   route).  The 'geoip' key sits several levels deeper than those names,
   so dict_search_recursive — which only walks dicts and lists for a
   matching dict key — never yielded a hit, and geoip_updated() always
   returned False.  As a consequence, geoip_update() was never triggered
   by an incremental add or change of a GeoIP rule; the only path that
   ever populated /run/nftables-geoip.conf was the explicit \"update
   geoip\" command or the fallback when geoip_refresh() failed.

   Fix: bypass node_changed() and call get_config_diff() /
   get_child_nodes_diff() directly with expand_nodes=Diff.ADD|Diff.DELETE
   and recursive=True.  In that mode, the 'add' and 'delete' values in
   the returned dict are full nested subtrees of the config diff, so
   dict_search_recursive correctly finds 'geoip' wherever it appears in
   the change set.

2. GeoIP block executed unconditionally, breaking the boot sequence

   geoip_sets() always returns {'name': [], 'ipv6_name': []}.  A
   non-empty dict is truthy in Python regardless of whether its values
   are empty lists, so the guards \"if geoip_sets:\" and
   \"if 'name' in geoip_sets:\" were always True.

   On boot, when policy_route.py is invoked as a dependent of
   firewall.py (triggered by group_resync), it entered the GeoIP block
   even with no policy route GeoIP rules configured.  Because
   /run/nftables-geoip.conf did not yet exist, geoip_refresh() returned
   False and geoip_update(policy=policy) was called with an empty
   policy.  This created /run/nftables-geoip.conf containing only empty
   table stubs.  When firewall.py subsequently called geoip_refresh(),
   the file existed and nft loaded it successfully — so the
   geoip_update(firewall) call was never reached and the firewall GeoIP
   sets stayed empty for the entire uptime of the router.

   Fix: check the actual list contents instead of the container dict:
   if geoip_sets['name'] or geoip_sets['ipv6_name'].

3. geoip_update() clobbered the other caller's sets

   geoip_update() renders /run/nftables-geoip.conf from both
   firewall_sets and policy_sets in a single pass.  When called with
   only one argument (as firewall.py and policy_route.py each do), the
   other argument defaulted to None and that half of the file was
   rendered empty, erasing whatever the other script had written.  The
   geoip-update helper used by \"update geoip\" and the weekly cron was
   unaffected because it always passes both arguments, which masked
   this bug in normal manual operation.

   Fix: when either argument is absent, read the missing config from
   the live Config session before building the set tables, so every
   invocation writes the complete combined firewall + policy file.
</content>
</entry>
<entry>
<title>T8379: PBR commit fail with traceback if non-existing VRF added</title>
<updated>2026-03-23T12:29:11+00:00</updated>
<author>
<name>Nataliia Solomko</name>
<email>natalirs1985@gmail.com</email>
</author>
<published>2026-03-23T12:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=f719b7d839c41293f132af1fd1857b6c1ff2b1ea'/>
<id>urn:sha1:f719b7d839c41293f132af1fd1857b6c1ff2b1ea</id>
<content type='text'>
</content>
</entry>
<entry>
<title>geoip: T7926: Refactor geoip handling</title>
<updated>2026-01-21T10:52:29+00:00</updated>
<author>
<name>sarthurdev</name>
<email>965089+sarthurdev@users.noreply.github.com</email>
</author>
<published>2025-10-02T15:47:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=7f6f94370ec04ce48e7a19880a74ba0c25f7bfb5'/>
<id>urn:sha1:7f6f94370ec04ce48e7a19880a74ba0c25f7bfb5</id>
<content type='text'>
* Move core logic to separate vyos.geoip module
* Use a sqlite database for storing and querying address ranges by country
* Remove downloaded geoip ranges once loaded into sqlite db
* No longer rebuild geoip sets on each commit unless necessary
* Allows for extensibility using other geoip data vendors
</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>geoip: T5636: Add geoip for policy route/route6</title>
<updated>2025-03-28T07:47:24+00:00</updated>
<author>
<name>sskaje</name>
<email>sskaje@gmail.com</email>
</author>
<published>2025-03-28T07:47:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=795154d9009b669f8858ed983c6b7486aaee1125'/>
<id>urn:sha1:795154d9009b669f8858ed983c6b7486aaee1125</id>
<content type='text'>
</content>
</entry>
<entry>
<title>pbr: T6430: refactor to use vyos.utils.network.get_vrf_tableid()</title>
<updated>2024-07-30T06:07:29+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2024-07-30T06:07:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=9b99a01653e3315b1abc9ef98824ca71bd283047'/>
<id>urn:sha1:9b99a01653e3315b1abc9ef98824ca71bd283047</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>pbr: T6430: Allow forwarding into VRFs by name as well as route table IDs</title>
<updated>2024-07-30T03:48:18+00:00</updated>
<author>
<name>Andrew Topp</name>
<email>atopp@aus-it.com.au</email>
</author>
<published>2024-07-30T03:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=adeac78ed6585b16102bd82581b54c75819714b2'/>
<id>urn:sha1:adeac78ed6585b16102bd82581b54c75819714b2</id>
<content type='text'>
* 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
</content>
</entry>
</feed>
