From 6c358eba75de36baf5653f79da653cd10ab26982 Mon Sep 17 00:00:00 2001 From: Daniel Nachtrub Date: Fri, 23 Aug 2024 22:40:24 +0200 Subject: [PATCH] fix: supress hw offload writable Added check_gateway on ipv6 route (#540) Signed-off-by: dn --- docs/resources/ipv6_route.md | 3 ++- routeros/resource_ipv6_route.go | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/resources/ipv6_route.md b/docs/resources/ipv6_route.md index 0471243e..0468e8c0 100644 --- a/docs/resources/ipv6_route.md +++ b/docs/resources/ipv6_route.md @@ -20,6 +20,7 @@ resource "routeros_ipv6_route" "a_route" { ### Optional - `blackhole` (Boolean) It's a blackhole route. If you need to cancel route marking, then simply delete the parameter from the configuration of the TF. The value of the parameter (true or false) has no effect on the MT processing logic. +- `check_gateway` (String) Currently used check-gateway option. - `comment` (String) - `disabled` (Boolean) - `distance` (Number) Value used in route selection. Routes with smaller distance value are given preference. @@ -28,6 +29,7 @@ resource "routeros_ipv6_route" "a_route" { - `scope` (Number) Used in nexthop resolution. Route can resolve nexthop only through routes that have scope less than or equal to the target-scope of this route. - `target_scope` (Number) Used in nexthop resolution. This is the maximum value of scope for a route through which a nexthop of this route can be resolved. - `vrf_interface` (String) VRF interface name. +- `suppress_hw_offload` (Boolean) ### Read-Only @@ -39,7 +41,6 @@ resource "routeros_ipv6_route" "a_route" { - `immediate_gw` (String) Shows actual (resolved) gateway and interface that will be used for packet forwarding. - `inactive` (Boolean) - `static` (Boolean) -- `suppress_hw_offload` (Boolean) ## Import Import is supported using the following syntax: diff --git a/routeros/resource_ipv6_route.go b/routeros/resource_ipv6_route.go index 4fa50713..ba0f9037 100644 --- a/routeros/resource_ipv6_route.go +++ b/routeros/resource_ipv6_route.go @@ -26,6 +26,12 @@ func ResourceIPv6Route() *schema.Resource { "parameter from the configuration of the TF. The value of the parameter (true or false) has no " + "effect on the MT processing logic.", }, + "check_gateway": { + Type: schema.TypeString, + Optional: true, + Description: "Currently used check-gateway option.", + ValidateFunc: validation.StringInSlice([]string{"arp", "bfd", "ping"}, false), + }, KeyComment: PropCommentRw, KeyDisabled: PropDisabledRw, "distance": { @@ -92,7 +98,7 @@ func ResourceIPv6Route() *schema.Resource { }, "suppress_hw_offload": { Type: schema.TypeBool, - Computed: true, + Optional: true, }, "target_scope": { Type: schema.TypeInt,