summaryrefslogtreecommitdiff
path: root/src/conf_mode/vrf.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-04-19 22:45:50 +0200
committerChristian Breunig <christian@breunig.cc>2026-04-21 06:13:21 +0200
commit754635c257b1860ce393cdc342c1b7ca7e65da1f (patch)
tree0fbb50cbf62c7ceb09a1a5f4568318ff0314f5c4 /src/conf_mode/vrf.py
parent1d81dd0c6190d9fd36d01014f3b0a2d4bb91a919 (diff)
downloadvyos-1x-754635c257b1860ce393cdc342c1b7ca7e65da1f.tar.gz
vyos-1x-754635c257b1860ce393cdc342c1b7ca7e65da1f.zip
T8534: refactor sysctl_(read|write) to accept key parts
Interface names can contain dots (e.g. VLAN subinterfaces like eth0.10), which conflicts with sysctl's dot-separated key syntax. Change sysctl_read() and sysctl_write() to take key components as a list and normalize each component by replacing . with / before invoking sysctl. This fixes sysctl lookups/updates for VLAN subinterfaces. Extend the SR-TE smoketest to cover a VLAN subinterface. Previous error raising this issue: vyos-configd: sysctl: cannot stat /proc/sys/net/ipv6/conf/eth0/10/seg6_enabled: No such file or directory vyos-configd: sysctl: cannot stat /proc/sys/net/ipv6/conf/eth0/201/seg6_enabled: No such file or directory
Diffstat (limited to 'src/conf_mode/vrf.py')
-rwxr-xr-xsrc/conf_mode/vrf.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index c9b34fe8e..92bb956ed 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -243,8 +243,8 @@ def apply(vrf):
bind_all = '0'
if 'bind_to_all' in vrf:
bind_all = '1'
- sysctl_write('net.ipv4.tcp_l3mdev_accept', bind_all)
- sysctl_write('net.ipv4.udp_l3mdev_accept', bind_all)
+ sysctl_write(['net', 'ipv4', 'tcp_l3mdev_accept'], bind_all)
+ sysctl_write(['net', 'ipv4', 'udp_l3mdev_accept'], bind_all)
for tmp in (dict_search('vrf_remove', vrf) or []):
if interface_exists(tmp):