Lines Matching refs:action

9  * to see if any IP address record should trigger a special action.
117 node->action = respip_none;
183 /** set action for the node specified by the netblock string */
189 enum respip_action action;
194 if(node->action != respip_none) {
195 verbose(VERB_QUERY, "duplicate response-ip action for '%s', overridden.",
199 action = respip_deny;
201 action = respip_redirect;
203 action = respip_inform;
205 action = respip_inform_deny;
207 action = respip_inform_redirect;
209 action = respip_always_transparent;
211 action = respip_always_refuse;
213 action = respip_always_nxdomain;
215 action = respip_always_nodata;
217 action = respip_always_deny;
219 log_err("unknown response-ip action %s", actnstr);
222 node->action = action;
307 if(raddr->action != respip_redirect
308 && raddr->action != respip_inform_redirect) {
310 "action for %s is not redirect", rrstr, netblock);
336 if(!node || node->action == respip_none) {
436 * with respip action, we're checking for both here because
437 * we want to catch the case where the respip action is missing
655 * the "no data" action in case of error.
656 * @param action: action to apply
660 * @param rrset_id: the rrset ID in 'rep' to which the action should apply
662 * @param tag: if >= 0 the tag ID used to determine the action and data
672 respip_data_answer(enum respip_action action,
684 if(action == respip_redirect && tag != -1 &&
727 * and replace the address rrset that triggers the action. If it's
745 * apply response ip action in case where no action data is provided.
753 * @param action: found action
761 respip_nodata_answer(uint16_t qtype, enum respip_action action,
767 if(action == respip_refuse || action == respip_always_refuse) {
774 } else if(action == respip_static || action == respip_redirect ||
775 action == respip_always_nxdomain ||
776 action == respip_always_nodata ||
777 action == respip_inform_redirect) {
779 * we generally return NOERROR/NODATA unless an NXDOMAIN action
781 int rcode = (action == respip_always_nxdomain)?
799 /** Populate action info structure with the results of response-ip action
801 * taking some action. Only action is set if action_only is true.
806 enum respip_action action, const struct resp_addr* raddr,
812 if(action == respip_none || !raddr)
814 actinfo->action = action;
823 if(action == respip_inform || action == respip_inform_deny ||
842 enum respip_action* action,
854 *action = raddr->action;
856 *action = rpz_action_to_respip_action(r->action_override);
862 if(*action == respip_always_transparent /* RPZ_PASSTHRU_ACTION */
889 enum respip_action action = respip_none;
941 /** for per-view respip directives the action
943 action = raddr->action;
955 action = (enum respip_action)local_data_find_tag_action(
958 (enum localzone_type)raddr->action, &tag,
969 if(!respip_use_rpz(raddr, r, &action, &data,
992 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)));
1009 /* first, see if we have response-ip or tag action for the
1010 * action except for 'always' variants. */
1011 if(action != respip_always_refuse
1012 && action != respip_always_transparent
1013 && action != respip_always_nxdomain
1014 && action != respip_always_nodata
1015 && action != respip_always_deny
1016 && (result = respip_data_answer(action,
1025 /* if no action data applied, take action specific to the
1026 * action without data. */
1027 if(!result && !respip_nodata_answer(qinfo->qtype, action, rep,
1040 * the appropriate action. Note that we don't check the
1041 * action type; it should normally be 'redirect', but it
1042 * can be of other type when a data-dependent tag action
1050 ret = populate_action_info(actinfo, action, raddr,
1117 actinfo.action = respip_none;
1127 if(actinfo.action != respip_none) {
1128 /* save action info for logging on a
1140 if (actinfo.action == respip_always_deny ||
1142 (actinfo.action == respip_deny ||
1143 actinfo.action == respip_inform_deny))) {
1181 actinfo.action = respip_none;
1198 /* see if the target reply would be subject to a response-ip action. */
1202 if(actinfo.action != respip_none) {
1203 log_info("CNAME target of redirect response-ip action would "
1204 "be subject to response-ip action, too; stripped");
1297 return addr ? addr->action : respip_none;
1340 respip_actinfo->action));