Re: [PATCH 1/4] length: support semi-infinite length description

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

 



Patrick McHardy wrote:
> Jan Engelhardt wrote:
>> The code is already there, it just was not documented. Also use
>> UINT16_MAX instead and pretty-print iptables's -L/-S output.
>>
>> @@ -97,9 +97,11 @@ length_print(const void *ip, const struct xt_entry_match *match, int numeric)
>>  
>>  	printf("length %s", info->invert ? "!" : "");
>>  	if (info->min == info->max)
>> -		printf("%u ", info->min);
>> +		printf("== %u ", info->min);

One more note - for the exact match I think "length X" is also
fine without ==.

>> +	else if (info->max == UINT16_MAX)
>> +		printf(">= %u ", info->min);
>>  	else
>> -		printf("%u:%u ", info->min, info->max);
>> +		printf("%u..%u ", info->min, info->max);
> 
> I prefer to keep using ":", this is what we use everywhere else for
> ranges.
> --
> 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
> 

--
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