Re: [PATCH nf 1/5] netfilter: nfnl_cthelper: don't report error if NFCTH_PRIV_DATA_LEN is empty

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

 



On Sun, Mar 19, 2017 at 10:35:58PM +0800, Liping Zhang wrote:
> From: Liping Zhang <zlpnobody@xxxxxxxxx>
> 
> Currently, when we create cthelper via nfnetlink, -EINVAL will be
> returned if the NFCTH_PRIV_DATA_LEN attribute is empty.
> 
> But enforcing the user to specify the NFCTH_PRIV_DATA_LEN attr seems
> unnecessary, so it's better to set the helper->data_len to zero if
> the NFCTH_PRIV_DATA_LEN attribute is empty.
> 
> Found by running example program from libnetfilter_cthelper:
>   # ./libnetfilter_cthelper/examples/nfct-helper-add test 1
>   error: Invalid argument

I suggest you fix this userspace example instead, we should always
send NFCTH_PRIV_DATA_LEN. This is integral part of the helper
description.

NFCTH_ATTR_PRIV_DATA_LEN has been always set from the conntrack-tools,
so most likely this example just got outdated at some point of the
development and nobody noticed so far.

Thanks.
--
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