Fix set verdict data type unmarshalling

Currently unmarshalling sets with "verdict" data type results in
the "verdict" type to be set as the key type, and the data type
remaining zero.

Properly set the verdict type to Set DataType field instead of
the KeyType.

Signed-off-by: Mikhail Sennikovsky <mikhail.sennikovskii@ionos.com>
This commit is contained in:
Mikhail Sennikovsky 2024-11-15 13:08:12 +01:00
parent 51c44dcf05
commit a0423c9897
1 changed files with 1 additions and 1 deletions

2
set.go
View File

@ -743,7 +743,7 @@ func setsFromMsg(msg netlink.Message) (*Set, error) {
nftMagic := ad.Uint32()
// Special case for the data type verdict, in the message it is stored as 0xffffff00 but it is defined as 1
if nftMagic == 0xffffff00 {
set.KeyType = TypeVerdict
set.DataType = TypeVerdict
break
}
dt, err := parseSetDatatype(nftMagic)