diff options
Diffstat (limited to 'table/policy.go')
-rw-r--r-- | table/policy.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/table/policy.go b/table/policy.go index 7ac8a6c3..1d055b57 100644 --- a/table/policy.go +++ b/table/policy.go @@ -56,6 +56,18 @@ const ( ROUTE_TYPE_REJECT ) +func (t RouteType) String() string { + switch t { + case ROUTE_TYPE_NONE: + return "continue" + case ROUTE_TYPE_ACCEPT: + return "accept" + case ROUTE_TYPE_REJECT: + return "reject" + } + return fmt.Sprintf("unknown(%d)", t) +} + type PolicyDirection int const ( |