summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNataliia S. <81954790+natali-rs1985@users.noreply.github.com>2026-02-03 16:52:17 +0200
committerGitHub <noreply@github.com>2026-02-03 16:52:17 +0200
commita12905c3010520db3c1d7e652c90853940be5e75 (patch)
tree50c621bacd8cf9c70091e1c8c744eaa95691d090 /python
parente7b45505a57dbbc2ec4cab31156b4110dcb4f508 (diff)
parent5299c50f2e85c9e4c3cbf28ac9cf31cd7d10a896 (diff)
downloadvyos-1x-a12905c3010520db3c1d7e652c90853940be5e75.tar.gz
vyos-1x-a12905c3010520db3c1d7e652c90853940be5e75.zip
Merge pull request #4965 from natali-rs1985/T8207
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',
+ )