Commit f5fa7eba authored by Kaarle Ritvanen's avatar Kaarle Ritvanen
Browse files

support for TCPMSS target

parent fd780ffd
TCP MSS clamping module for Alpine Wall
Copyright (C) 2012 Kaarle Ritvanen
Licensed under the terms of GPL2
module(..., package.seeall)
require 'awall.model'
local model = awall.model
local ClampMSSRule = model.class(model.ForwardOnlyRule)
function ClampMSSRule:checkzoneoptfrag(ofrag)
if ofrag['in'] then
self:error('Cannot specify inbound interface ('..ofrag['in']..')')
function ClampMSSRule:table() return 'mangle' end
function ClampMSSRule:chain() return 'POSTROUTING' end
function ClampMSSRule:servoptfrags()
return {{opts='-p tcp --tcp-flags SYN,RST SYN'}}
function ClampMSSRule:target()
return 'TCPMSS --'..(self.mss and 'set-mss '..self.mss or 'clamp-mss-to-pmtu')
classes = {{'clamp-mss', ClampMSSRule}}
defrules = {}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment