On Monday 2011-06-06 15:44, Maciej Żenczykowski wrote:

>> The mask indicates the bits one wants to zero out, so it needs to be
>> inverted before applying to the original TOS field.
>
>Uhm, does it?
>This is backwards incompatible...
>
>To me, you always 'and' with a mask, not with the negation of the mask.
>ie. a mask is the bits you want to keep.

That certainly is not set into stone.

If you model a sculpture into an ice/concrete/wood/etc. block, you 
usually specify what to take away rather than what to leave, to take a 
non-abstract example. But see below.


>(mind you I haven't looked at the documentation of the feature,

[You should do that.]

xt_MARK does the same as xt_TOS, and both should be using &~ - because 
--set-mark 0x12/0x0f has always meant "kill 0x3f, then set 0x12".

I wager to say that the most common applications are:

 --set-mark somevalue/samevalue
 --set-mark somevalue/0xff

so having to calculate the negation of samevalue is usually wasted brain 
time.

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to