From 19eb6eac296548ceb95f359ac04821aaac0c6d79 Mon Sep 17 00:00:00 2001 From: Leon Vack Date: Sun, 12 Jan 2020 16:07:37 +0100 Subject: [PATCH] fixed extraHeader in SetAddElements --- set.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set.go b/set.go index 6fa1645..341710b 100644 --- a/set.go +++ b/set.go @@ -170,7 +170,7 @@ func (cc *Conn) SetAddElements(s *Set, vals []SetElement) error { Type: netlink.HeaderType((unix.NFNL_SUBSYS_NFTABLES << 8) | unix.NFT_MSG_NEWSETELEM), Flags: netlink.Request | netlink.Acknowledge | netlink.Create, }, - Data: append(extraHeader(unix.NFTA_SET_NAME, 0), cc.marshalAttr(elements)...), + Data: append(extraHeader(uint8(s.Table.Family), 0), cc.marshalAttr(elements)...), }) return nil