Skip to content

Commit

Permalink
fix: Ability to set clamp-tcp-mss on mangle rule
Browse files Browse the repository at this point in the history
Fixes #178
  • Loading branch information
vaerh committed Apr 20, 2023
1 parent ffb53d6 commit 3226a91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions routeros/resource_ip_firewall_mangle.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,16 @@ func ResourceIPFirewallMangle() *schema.Resource {
ValidateFunc: validation.IntBetween(0, 63),
},
"new_mss": {
Type: schema.TypeInt,
Type: schema.TypeString,
Optional: true,
Description: `Sets a new MSS for a packet.
> Clampt-to-pmtu feature sets (DF) bit in the IP header to dynamically discover the PMTU of a path.
> clamp-to-pmtu feature sets (DF) bit in the IP header to dynamically discover the PMTU of a path.
> Host sends all datagrams on that path with the DF bit set until receives ICMP.
> Destination Unreachable messages with a code meaning "fragmentation needed and DF set".
> Upon receipt of such a message, the source host reduces its assumed PMTU for the path.
`,
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^(\d+|clamp-to-pmtu)$`),
`Value must be a number in quotes or the string "clamp-to-pmtu".`),
},
"new_packet_mark": {
Type: schema.TypeString,
Expand Down

0 comments on commit 3226a91

Please sign in to comment.