Re: [PATCH nf 2/5] netfilter: nfnl_cthelper: fix incorrect helper->expect_class_max

2017-03-21 Thread Pablo Neira Ayuso
On Tue, Mar 21, 2017 at 10:35:43PM +0800, Liping Zhang wrote: > Hi Pablo, > > 2017-03-21 18:27 GMT+08:00 Pablo Neira Ayuso : > [...] > >> + class_max = ntohl(nla_get_be32(tb[NFCTH_POLICY_SET_NUM])); > >> + if (class_max == 0) > >> + return -EINVAL; > > > >

Re: [PATCH nf 2/5] netfilter: nfnl_cthelper: fix incorrect helper->expect_class_max

2017-03-21 Thread Liping Zhang
Hi Pablo, 2017-03-21 18:27 GMT+08:00 Pablo Neira Ayuso : [...] >> + class_max = ntohl(nla_get_be32(tb[NFCTH_POLICY_SET_NUM])); >> + if (class_max == 0) >> + return -EINVAL; > > I think this patch is just fixing up this case. We should always > provide a

Re: [PATCH nf 2/5] netfilter: nfnl_cthelper: fix incorrect helper->expect_class_max

2017-03-21 Thread Pablo Neira Ayuso
On Sun, Mar 19, 2017 at 10:35:59PM +0800, Liping Zhang wrote: > From: Liping Zhang > > The helper->expect_class_max must be set to the total number of > expect_policy minus 1, since we will use the statement "if (class > > helper->expect_class_max)" to validate the