mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	netfilter: nft_nat: allow to specify layer 4 protocol NAT only
nft_nat reports a bogus EAFNOSUPPORT if no layer 3 information is specified.
Fixes: d07db9884a ("netfilter: nf_tables: introduce nft_validate_register_load()")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
			
			
This commit is contained in:
		
							parent
							
								
									30a56a2b88
								
							
						
					
					
						commit
						a33f387ecd
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -201,7 +201,9 @@ static int nft_nat_init(const struct nft_ctx *ctx, const struct nft_expr *expr,
 | 
			
		|||
		alen = sizeof_field(struct nf_nat_range, min_addr.ip6);
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		if (tb[NFTA_NAT_REG_ADDR_MIN])
 | 
			
		||||
			return -EAFNOSUPPORT;
 | 
			
		||||
		break;
 | 
			
		||||
	}
 | 
			
		||||
	priv->family = family;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue