netfilter: nf_tables: nft_meta module get/set ops
This patch adds kernel support for the meta expression in get/set flavour. The set operation indicates that a given packet has to be set with a property, currently one of mark, priority, nftrace. The get op is what was currently working: evaluate the given packet property. In the nftrace case, the value is always 1. Such behaviour is copied from net/netfilter/xt_TRACE.c The NFTA_META_DREG and NFTA_META_SREG attributes are mutually exclusives. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
		
					parent
					
						
							
								d8bcc768c8
							
						
					
				
			
			
				commit
				
					
						e035b77ac7
					
				
			
		
					 2 changed files with 129 additions and 27 deletions
				
			
		|  | @ -555,11 +555,13 @@ enum nft_meta_keys { | |||
|  * | ||||
|  * @NFTA_META_DREG: destination register (NLA_U32) | ||||
|  * @NFTA_META_KEY: meta data item to load (NLA_U32: nft_meta_keys) | ||||
|  * @NFTA_META_SREG: source register (NLA_U32) | ||||
|  */ | ||||
| enum nft_meta_attributes { | ||||
| 	NFTA_META_UNSPEC, | ||||
| 	NFTA_META_DREG, | ||||
| 	NFTA_META_KEY, | ||||
| 	NFTA_META_SREG, | ||||
| 	__NFTA_META_MAX | ||||
| }; | ||||
| #define NFTA_META_MAX		(__NFTA_META_MAX - 1) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Arturo Borrero Gonzalez
				Arturo Borrero Gonzalez