Pablo Neira Ayuso 7210e4e38f netfilter: nf_tables: restrict nat/masq expressions to nat chain type
This adds the missing validation code to avoid the use of nat/masq from
non-nat chains. The validation assumes two possible configuration
scenarios:

1) Use of nat from base chain that is not of nat type. Reject this
   configuration from the nft_*_init() path of the expression.

2) Use of nat from non-base chain. In this case, we have to wait until
   the non-base chain is referenced by at least one base chain via
   jump/goto. This is resolved from the nft_*_validate() path which is
   called from nf_tables_check_loops().

The user gets an -EOPNOTSUPP in both cases.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-10-13 20:42:00 +02:00
..
2014-08-22 12:23:11 -07:00
2014-10-04 20:44:44 -04:00
2014-09-30 17:08:06 -04:00
2014-09-10 12:40:10 -07:00
2014-09-28 07:05:16 -07:00
2014-10-09 01:40:05 -04:00
2014-09-07 16:07:25 -07:00
2014-10-07 20:28:44 -04:00