Anonymous set creation (#79)

Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
This commit is contained in:
Serguei Bezverkhi 2019-12-05 12:08:48 -05:00 committed by Michael Stapelberg
parent 4f16059f2d
commit 4525b500cb
1 changed files with 0 additions and 4 deletions

4
set.go
View File

@ -334,10 +334,6 @@ func (cc *Conn) AddSet(s *Set, vals []SetElement) error {
// Set the values of the set if initial values were provided.
if len(vals) > 0 {
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)
if err != nil {
return err