def check_config(self):
        test_config_condition(
            not self.rules, 'no rules found for ACL %s' % self._id)
        for rule in self.rules:
            self._check_conf_types(rule, self.rule_types)
            for rule_field, rule_conf in rule.items():
                if rule_field == 'cookie':
                    test_config_condition(
                        rule_conf < 0 or rule_conf > 2**16,
                        'rule cookie value must be 0-2**16')
                elif rule_field == 'actions':
                    test_config_condition(
                        not rule_conf,
                        'Missing rule actions in ACL %s' % self._id)
                    self._check_conf_types(rule_conf, self.actions_types)
                    for action_name, action_conf in rule_conf.items():
                        if action_name == 'output':
                            if isinstance(action_conf, (list, tuple)):
                                # New ordered format
                                for subconf in action_conf:
                                    # Make sure only one specified action per list element
                                    test_config_condition(
                                        len(subconf) > 1,
                                        'ACL ordered output must have only one action per element')
                                    # Ensure correct action format
                                    self._check_conf_types(subconf, self.output_actions_types)
                            else:
                                # Old format
                                self._check_conf_types(
                                    action_conf, self.output_actions_types)
                        elif action_name == 'ct':
                            self._check_conf_types(action_conf, self.ct_action_types)
                            # if clear set, make sure nothing else is
                            if 'clear' in action_conf and action_conf['clear']:
                                test_config_condition(
                                    len(action_conf) != 1,
                                    "no other parameters can be set when 'clear' set on "
                                    "conntrack ACL")
                            else:
                                test_config_condition(
                                    'table' not in action_conf,
                                    "required parameter 'table' not set for conntrack ACL")
                                test_config_condition(
                                    'zone' not in action_conf,
                                    "required parameter 'zone' not set for conntrack ACL")
                            if 'nat' in action_conf:
                                self._check_conf_types(action_conf['nat'], self.ct_action_nat_types)