diff --git a/obj.go b/obj.go index 72936bd..a88aed4 100644 --- a/obj.go +++ b/obj.go @@ -185,15 +185,15 @@ func (cc *Conn) getObj(o Obj, t *Table, msgType uint16) ([]Obj, error) { if o != nil { data, err = o.marshal(false) - if err != nil { - return nil, err - } } else { flags = netlink.Dump data, err = netlink.MarshalAttributes([]netlink.Attribute{ {Type: unix.NFTA_RULE_TABLE, Data: []byte(t.Name + "\x00")}, }) } + if err != nil { + return nil, err + } message := netlink.Message{ Header: netlink.Header{