From 6a61933ab73a14c748a9d77acfb97594dea6dcf3 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Fri, 15 Sep 2023 23:51:22 -0700 Subject: [PATCH] Fix dropped error (#240) Signed-off-by: Lars Lehtonen --- set.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/set.go b/set.go index 3588b00..c267659 100644 --- a/set.go +++ b/set.go @@ -567,7 +567,9 @@ func (cc *Conn) AddSet(s *Set, vals []SetElement) error { descSize, err := netlink.MarshalAttributes([]netlink.Attribute{ {Type: unix.NFTA_SET_DESC_SIZE, Data: valData}, }) - + if err != nil { + return fmt.Errorf("fail to marshal base type size description: %w", err) + } concatDefinition = append(concatDefinition, descSize...) } // Marshal all base type descriptions into concatenation size description