mirror of
https://github.com/luscis/openlan.git
synced 2025-10-06 17:17:00 +08:00
fea: switch: support router network
This commit is contained in:
@@ -47,6 +47,7 @@ type IpRule struct {
|
||||
SetMss int
|
||||
Order string
|
||||
Match string
|
||||
CtState string
|
||||
TcpFlag []string
|
||||
}
|
||||
|
||||
@@ -81,6 +82,9 @@ func (ru IpRule) Args() []string {
|
||||
args = append(args, "!")
|
||||
args = append(args, "-m", "set", "--match-set", ru.NoDestSet, "dst")
|
||||
}
|
||||
if ru.CtState != "" {
|
||||
args = append(args, "-m", "conntrack", "--ctstate", ru.CtState)
|
||||
}
|
||||
if ru.Proto != "" {
|
||||
args = append(args, "-p", ru.Proto)
|
||||
}
|
||||
|
Reference in New Issue
Block a user