Re: [PATCH v2 nft] parser: tcpopt: fix tcp option parsing with NUM + length field

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

 



Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
> >  	if (!desc) {
> > -		if (field != TCPOPT_COMMON_KIND || kind > 255)
> > +		if (kind > 255)
> >  			return NULL;
> 
> Another suggestion: Remove this NULL, it leaves lhs as NULL in the
> relational. kind > 255 cannot ever happen, parser rejects numbers over
> 255.

We can also feed this via input from udata (typeof).
So I'd rather not assert() or rely on bison checks.




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux