On Friday 2011-01-14 23:22, Thomas Graf wrote: > >> >+static int audit_tg_check(const struct xt_tgchk_param *par) >> >+{ >> >+ const struct xt_AUDIT_info *info = par->targinfo; >> >+ >> >+ if (info->type > XT_AUDIT_TYPE_MAX) { >> >+ pr_info("Audit type out of range (valid range: 0..%u)\n", >> >+ XT_AUDIT_TYPE_MAX); >> >+ return -ERANGE; >> >+ } >> >+ >> >+ return 0; >> >+} >> >> Math nitpick: EDOM, not ERANGE. > >ERANGE is the common error code to use in this situation. EDOM is the common error code to use in Xtables for too large inputs, ERANGE for too large results as a result of inputs (just like errno(3) specifies). See the other xt modules. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html