add interval flag support to set (#43)
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
This commit is contained in:
parent
9907ca3831
commit
26de8f0eaa
4
set.go
4
set.go
|
@ -63,6 +63,7 @@ type Set struct {
|
|||
Name string
|
||||
Anonymous bool
|
||||
Constant bool
|
||||
Interval bool
|
||||
|
||||
KeyType SetDatatype
|
||||
DataLen int
|
||||
|
@ -161,6 +162,9 @@ func (cc *Conn) AddSet(s *Set, vals []SetElement) error {
|
|||
if s.Constant {
|
||||
flags |= unix.NFT_SET_CONSTANT
|
||||
}
|
||||
if s.Interval {
|
||||
flags |= unix.NFT_SET_INTERVAL
|
||||
}
|
||||
if s.DataLen > 0 {
|
||||
flags |= unix.NFT_SET_MAP
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue