Re: [PATCHv2] netfilter: audit target to record accepted/dropped packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux