Re: [PATCH nft v2 1/6] osf: add version fingerprint support

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

 



Hi Fernando,

On Mon, Mar 11, 2019 at 04:14:12PM +0100, Fernando Fernandez Mancera wrote:
> Add support for version fingerprint in "osf" expression. Example:
> 
> table ip foo {
> 	chain bar {
> 		type filter hook input priority filter; policy accept;
> 		osf ttl skip name "Linux"
> 		osf ttl skip name version "Linux:4.20"
> 	}
> }

The syntax seems overly complicated to me, although I'm not really
familiar with OSF so may lack background knowledge. Any reason why you
didn't go with 'osf ttl skip name "Linux" version "4.20"' instead?

Also with regards to your patch to json_parser, I guess you should
introduce an enum for flag values, something like:

| enum osf_flags {
| 	OSF_FLAG_INVALID = 0x0,
| 	OSF_FLAG_VERSION = 0x1
| };
| 
| const char *osf_flag_names[] = {
| 	[OSF_VERSION] = "version"
| };

What do you think?

Cheers, Phil



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

  Powered by Linux