Lines Matching full:action

9  * to see if any IP address record should trigger a special action.
116 node->action = respip_none;
179 /** set action for the node specified by the netblock string */
185 enum respip_action action;
189 if(node->action != respip_none) {
190 verbose(VERB_QUERY, "duplicate response-ip action for '%s', overridden.",
194 action = respip_deny;
196 action = respip_redirect;
198 action = respip_inform;
200 action = respip_inform_deny;
202 action = respip_inform_redirect;
204 action = respip_always_transparent;
206 action = respip_always_refuse;
208 action = respip_always_nxdomain;
210 action = respip_always_nodata;
212 action = respip_always_deny;
214 log_err("unknown response-ip action %s", actnstr);
217 node->action = action;
302 if(raddr->action != respip_redirect
303 && raddr->action != respip_inform_redirect) {
305 "action for %s is not redirect", rrstr, netblock);
330 if(!node || node->action == respip_none) {
429 * with respip action, we're checking for both here because
430 * we want to catch the case where the respip action is missing
647 * the "no data" action in case of error.
648 * @param action: action to apply
652 * @param rrset_id: the rrset ID in 'rep' to which the action should apply
654 * @param tag: if >= 0 the tag ID used to determine the action and data
664 respip_data_answer(enum respip_action action,
676 if(action == respip_redirect && tag != -1 &&
719 * and replace the address rrset that triggers the action. If it's
737 * apply response ip action in case where no action data is provided.
745 * @param action: found action
753 respip_nodata_answer(uint16_t qtype, enum respip_action action,
759 if(action == respip_refuse || action == respip_always_refuse) {
766 } else if(action == respip_static || action == respip_redirect ||
767 action == respip_always_nxdomain ||
768 action == respip_always_nodata ||
769 action == respip_inform_redirect) {
771 * we generally return NOERROR/NODATA unless an NXDOMAIN action
773 int rcode = (action == respip_always_nxdomain)?
791 /** Populate action info structure with the results of response-ip action
793 * taking some action. Only action is set if action_only is true.
798 enum respip_action action, const struct resp_addr* raddr,
804 if(action == respip_none || !raddr)
806 actinfo->action = action;
815 if(action == respip_inform || action == respip_inform_deny ||
834 enum respip_action* action,
846 *action = raddr->action;
848 *action = rpz_action_to_respip_action(r->action_override);
854 if(*action == respip_always_transparent /* RPZ_PASSTHRU_ACTION */
881 enum respip_action action = respip_none;
922 /** for per-view respip directives the action
924 action = raddr->action;
936 action = (enum respip_action)local_data_find_tag_action(
939 (enum localzone_type)raddr->action, &tag,
950 if(!respip_use_rpz(raddr, r, &action, &data,
973 verbose(VERB_ALGO, "respip: rpz: response-ip trigger %s/%d on %s %s with action %s", nm, raddr->node.net, qn, ip, rpz_action_to_string(respip_action_to_rpz_action(action)));
990 /* first, see if we have response-ip or tag action for the
991 * action except for 'always' variants. */
992 if(action != respip_always_refuse
993 && action != respip_always_transparent
994 && action != respip_always_nxdomain
995 && action != respip_always_nodata
996 && action != respip_always_deny
997 && (result = respip_data_answer(action,
1006 /* if no action data applied, take action specific to the
1007 * action without data. */
1008 if(!result && !respip_nodata_answer(qinfo->qtype, action, rep,
1021 * the appropriate action. Note that we don't check the
1022 * action type; it should normally be 'redirect', but it
1023 * can be of other type when a data-dependent tag action
1031 ret = populate_action_info(actinfo, action, raddr,
1098 actinfo.action = respip_none;
1107 if(actinfo.action != respip_none) {
1108 /* save action info for logging on a
1120 if (actinfo.action == respip_always_deny ||
1122 (actinfo.action == respip_deny ||
1123 actinfo.action == respip_inform_deny))) {
1160 actinfo.action = respip_none;
1177 /* see if the target reply would be subject to a response-ip action. */
1181 if(actinfo.action != respip_none) {
1182 log_info("CNAME target of redirect response-ip action would "
1183 "be subject to response-ip action, too; stripped");
1275 return addr ? addr->action : respip_none;
1318 respip_actinfo->action));