# Changelog

## [0.4.0] - 2023-06-28
### New Features
 - Expose API that echo back the configuration with the generated handle values.
   This way, rules may be deleted later without having to list the ruleset first.
 - Use stdin instead of /tmp files to pass the input to the `nft` binary.

## [0.3.0] - 2023-04-20
### New Features
 - Expose API that accepts a context object for the binary exec (`nft`) backend.
   When using the top level `nft` package, the new functions are: `ReadConfigContext and `ApplyConfigContext`.
   The old functions are kept with a default context timeout of 30 seconds.
 - Expose API that accepts filter commands when reading the configuration.
   When reading the configuration, by default all the ruleset are loaded.
   Now, the caller can specify filter commands to limit the loaded entries.
   E.g. `ReadConfig("table", "inet", "mytable")`.

### Breaking Changes
 - The functions exposed through `nft/exec` have been changed to accept a context.
 - `ReadConfig` exposed through `nft/lib/exec` has been changed to accept filter commands.
   The new parameter is variadic, reducing the chances a caller will be influenced by this.

## [0.2.0] - 2021-09-13
### New Features
 - Add support to link with libnftables using CGO.
   In order to use the lib backend, libnftables devel headers needs to be installed on the build machine.
 - Support NAT statements: dnat, snat, masquerade, redirect.
 - Support anonymous counter statement.

### Bug Fixes
 - When calling the `nft` binary, pass the nftables configuration through a temp file instead of a buffer.
   This is a workaround to the SELinux policy issue: https://github.com/containers/container-selinux/issues/147

## [0.1.1] - 2021-06-29
### Breaking Changes
 - Move the repo to the networkplumbing organization.
   Consume go-nft by importing `github.com/networkplumbing/go-nft/nft`

## [0.1.0] - 2021-06-29
### New Features
 - Initial release.

