Report whether set has flag configured (#98)

This commit is contained in:
Zackery Field 2020-02-26 23:28:57 -08:00 committed by GitHub
parent 1c56a1906f
commit 9caf4234bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

1
set.go
View File

@ -498,6 +498,7 @@ func setsFromMsg(msg netlink.Message) (*Set, error) {
set.Anonymous = (flags & unix.NFT_SET_ANONYMOUS) != 0
set.Interval = (flags & unix.NFT_SET_INTERVAL) != 0
set.IsMap = (flags & unix.NFTA_SET_TABLE) != 0
set.HasTimeout = (flags & unix.NFTA_SET_TIMEOUT) != 0
case unix.NFTA_SET_KEY_TYPE:
nftMagic := ad.Uint32()
if invalidMagic, ok := validateKeyType(nftMagic); !ok {