Anonymous set creation (#79)
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
This commit is contained in:
parent
4f16059f2d
commit
4525b500cb
4
set.go
4
set.go
|
@ -334,10 +334,6 @@ func (cc *Conn) AddSet(s *Set, vals []SetElement) error {
|
||||||
// Set the values of the set if initial values were provided.
|
// Set the values of the set if initial values were provided.
|
||||||
if len(vals) > 0 {
|
if len(vals) > 0 {
|
||||||
hdrType := unix.NFT_MSG_NEWSETELEM
|
hdrType := unix.NFT_MSG_NEWSETELEM
|
||||||
if s.Anonymous {
|
|
||||||
// Anonymous sets can only be populated within NEWSET.
|
|
||||||
hdrType = unix.NFT_MSG_NEWSET
|
|
||||||
}
|
|
||||||
elements, err := s.makeElemList(vals)
|
elements, err := s.makeElemList(vals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue