Subject: Re: [PATCH 1/2] improve netem reorder flexibility

From: David Miller <[email-masked]>
Date: Sat, 16 Jan 2010 01:46:54 -0800 (PST)

From: Stephen Hemminger <[email-masked]>
Date: Mon, 21 Dec 2009 09:54:07 -0800

> The netem logic for parsing attributes is different from others for
> historical reasons.  Looking at parse_attr():
> 
> If qopt is larger than expected, then the extra data is interpreted as
> the following nested attribute.
> 
> If qopt is smaller than expected, then it returns -EINVAL.

This is a really dangerous way to handle this.

This means if you grow qopt, older kernels think that the
extended area is attributes.

This also means that if you have new tools and send a qopt +
attributes, older kernels won't find the start of the attributes
correctly.  It will miss the attributes entirely.

This is a complete mess, and we need to sort it out before we think
about changing the size of qopt at this point.