summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuslan Volodin <ntwman93@gmail.com>2026-04-14 16:17:14 +0300
committerRuslan Volodin <ntwman93@gmail.com>2026-04-20 13:23:49 +0300
commit382b13c9153fe09f7545ac789e692ec4173d228f (patch)
tree68ff86c45669457668f8c7904ab0080f241310ee /src
parent67b68bd9893ad3a39af53ceee856ce5c61ed0638 (diff)
downloadvyos-1x-382b13c9153fe09f7545ac789e692ec4173d228f.tar.gz
vyos-1x-382b13c9153fe09f7545ac789e692ec4173d228f.zip
VPP: T8495: fix issue with assigning acl on sub interfaces
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces_ethernet.py11
-rw-r--r--src/conf_mode/vpp_acl.py7
2 files changed, 16 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces_ethernet.py b/src/conf_mode/interfaces_ethernet.py
index 886f9b7b7..8d40e4d1f 100755
--- a/src/conf_mode/interfaces_ethernet.py
+++ b/src/conf_mode/interfaces_ethernet.py
@@ -175,6 +175,8 @@ def get_config(config=None):
if tmp: ethernet.update({'frr_dict' : get_frrender_dict(conf)})
ethernet['flowtable_interfaces'] = get_flowtable_interfaces(conf)
+ vif_changed = is_node_changed(conf, base + [ifname, 'vif'])
+ vif_s_changed = is_node_changed(conf, base + [ifname, 'vif-s'])
vpp_config = conf.get_config_dict(
['vpp'],
@@ -190,6 +192,13 @@ def get_config(config=None):
get_first_key=True,
no_tag_node_value_mangle=True,
)
+ if (
+ 'acl' in vpp_config
+ and (vif_changed or vif_s_changed)
+ and dict_search(f'settings.interface.{ifname}', vpp_config) is not None
+ ):
+ ethernet['vpp_acl_dependent'] = True
+ set_dependents('vpp_acl', conf)
# Protocols static arp dependency
if 'static_arp' in ethernet:
@@ -441,7 +450,7 @@ def apply(ethernet):
e.remove()
else:
e.update(ethernet)
- if 'static_arp' in ethernet:
+ if 'static_arp' in ethernet or 'vpp_acl_dependent' in ethernet:
call_dependents()
vpp_iface_config = dict_search(f'vpp.settings.interface.{ifname}', ethernet)
diff --git a/src/conf_mode/vpp_acl.py b/src/conf_mode/vpp_acl.py
index ccbe11763..5b282dfdc 100644
--- a/src/conf_mode/vpp_acl.py
+++ b/src/conf_mode/vpp_acl.py
@@ -25,6 +25,7 @@ from vyos.configdict import node_changed
from vyos.config import Config
from vyos.utils.network import get_protocol_by_name
+from vyos.vpp.utils import cli_ethernet_with_vifs_ifaces
from vyos.vpp.utils import cli_ifaces_list
from vyos.vpp.acl import Acl
from vyos.vpp.config_verify import verify_vpp_interface_not_a_member
@@ -184,7 +185,11 @@ def get_config(config=None) -> dict:
{
'changed_ip_ifaces': changed_ip_ifaces,
'changed_mac_ifaces': changed_mac_ifaces,
- 'vpp_ifaces': cli_ifaces_list(conf),
+ 'vpp_ifaces': list(
+ dict.fromkeys(
+ cli_ifaces_list(conf) + cli_ethernet_with_vifs_ifaces(conf)
+ )
+ ),
}
)