Re: [PATCH 2/3] xt_TOS target

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

 



On Nov 19 2007 11:40, Patrick McHardy wrote:
> Jan Engelhardt wrote:
>> Posted for review and checkup.
>> 
>> +++ net-2.6.25/include/linux/netfilter/xt_TOS.h
>> @@ -0,0 +1,13 @@
>> +#ifndef _XT_TOS_TARGET_H
>> +#define _XT_TOS_TARGET_H
>> +
>> +#ifndef IPTOS_NORMALSVC
>> +#	define IPTOS_NORMALSVC 0
>> +#endif
>> +
>> +struct xt_tos_target_info {
>> +	u_int8_t tos_value;
>> +	u_int8_t tos_mask;
>
> Is the mask thing really useful?

Yes, in case you want to modify an existing TOS value, e.g.

	-j TOS --tos 0x08/0x08

Sets Maximize-Throughput (plus whatever other TOS flags are already there).

	-j TOS --tos 0x08/0x18

Sets Maximize-Throughput and clears Minimize-Delay, and keeps other
flags (such as Maximize-Reliability).

Or, should the user desire, change all Min-Delay flows into Max-Thru
and vice-versa:

	-j TOS --tos 0x18/0x00

The mask becomes especially useful since with xt_tos/xt_TOS, you can
also match/set the Precedence (the upper 4 bits of the 8-bit TOS field),
and for that, you need a mask unless you want to touch the lower 4 bits too.

>> --- net-2.6.25.orig/include/linux/netfilter_ipv4/Kbuild
>> +++ net-2.6.25/include/linux/netfilter_ipv4/Kbuild
>> @@ -9,7 +9,6 @@ header-y += ipt_NFQUEUE.h
>>  header-y += ipt_REJECT.h
>>  header-y += ipt_SAME.h
>>  header-y += ipt_TCPMSS.h
>> -header-y += ipt_TOS.h
>
>
> We also need to keep this one I think.
>

Suppose so.


Thanks,
Jan
-
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