Re: [PATCH 2/9] netfilter: xtables: slightly more detailed checkentry return values

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

 



Jan Engelhardt wrote:
> On Wednesday 2010-03-17 14:39, Patrick McHardy wrote:
>> Jan Engelhardt wrote:
>>> When extended status codes are available, such as ENOMEM on failed
>>> allocations, or subsequent functions (e.g. nf_ct_get_l3proto), passing
>>> them up to userspace seems like a good idea compared to just always
>>> EINVAL.
>>> diff --git a/net/bridge/netfilter/ebt_802_3.c b/net/bridge/netfilter/ebt_802_3.c
>>> index 5d11767..7b6f4c4 100644
>>> --- a/net/bridge/netfilter/ebt_802_3.c
>>> +++ b/net/bridge/netfilter/ebt_802_3.c
>>> @@ -36,7 +36,7 @@ ebt_802_3_mt(const struct sk_buff *skb, const struct xt_match_param *par)
>>>  	return true;
>>>  }
>>>  
>>> -static bool ebt_802_3_mt_check(const struct xt_mtchk_param *par)
>>> +static int ebt_802_3_mt_check(const struct xt_mtchk_param *par)
>>>  {
>>>  	const struct ebt_802_3_info *info = par->matchinfo;
>> Sigh, so we're basically going back to the old signatures.
> 
> To err is human :-)
> 
>> I guess this makes sense, however iptables has special interpretations
>> of errno values. How will this interact?
> 
> Since we are "just going back", the effect should be none - dig out
> an old iptables and kernel and you get the same environment.

No, we're now returning additional errno values from modules.

> Well, libiptc prints a few specialized error messages for certain
> codes (cf libiptc.c, TC_STRERROR), else uses plain libc strerror.

That's what I was talking about. Unfortunately quite a few
of the reasonable combinations have special meaning, f.i.
TC_INIT/ENOENT, TC_INIT/EINVAL, ...
--
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