summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2026-02-03 11:57:29 +0200
committerNataliia Solomko <natalirs1985@gmail.com>2026-02-03 11:57:29 +0200
commit5299c50f2e85c9e4c3cbf28ac9cf31cd7d10a896 (patch)
tree591bf531e42520490457af7c00db81e243214478 /python
parente31c302a024720da060889ea98eaf8d4069613fd (diff)
downloadvyos-1x-5299c50f2e85c9e4c3cbf28ac9cf31cd7d10a896.tar.gz
vyos-1x-5299c50f2e85c9e4c3cbf28ac9cf31cd7d10a896.zip
vpp: T8207: Enable ip6-icmp-ra-punt feature on interfaces with DHCPv6 address configured
Diffstat (limited to 'python')
-rw-r--r--python/vyos/vpp/control_vpp.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/python/vyos/vpp/control_vpp.py b/python/vyos/vpp/control_vpp.py
index 18ec349bc..91b682360 100644
--- a/python/vyos/vpp/control_vpp.py
+++ b/python/vyos/vpp/control_vpp.py
@@ -525,3 +525,44 @@ class VPPControl:
sw_if_index=self.get_sw_if_index(ifname),
enable=False,
)
+
+ @_Decorators.api_call
+ def enable_icmpv6_ra_punt(self, ifname: str) -> None:
+ """Enable ip6-icmp-ra-punt feature on a given interface for both ip6-unicast and ip6-multicast arcs.
+
+ This ensures that IPv6 ICMP Router Advertisements (RA) are punted to the host, which is typically required
+ for features such as DHCPv6 client operation.
+
+ Args:
+ ifname (str): name of an interface in kernel
+ """
+ iface_index = self.get_sw_if_index(ifname)
+ for arc_name in ['ip6-unicast', 'ip6-multicast']:
+ feature_is_enabled = self.__vpp_api_client.api.feature_is_enabled(
+ sw_if_index=iface_index,
+ feature_name='ip6-icmp-ra-punt',
+ arc_name=arc_name,
+ )
+
+ if not feature_is_enabled.is_enabled:
+ self.__vpp_api_client.api.feature_enable_disable(
+ sw_if_index=iface_index,
+ enable=True,
+ arc_name=arc_name,
+ feature_name='ip6-icmp-ra-punt',
+ )
+
+ @_Decorators.api_call
+ def disable_icmpv6_ra_punt(self, ifname: str) -> None:
+ """Disable ip6-icmp-ra-punt feature on a given interface
+
+ Args:
+ ifname (str): name of an interface in kernel
+ """
+ for arc_name in ['ip6-unicast', 'ip6-multicast']:
+ self.__vpp_api_client.api.feature_enable_disable(
+ sw_if_index=self.get_sw_if_index(ifname),
+ enable=False,
+ arc_name=arc_name,
+ feature_name='ip6-icmp-ra-punt',
+ )