both commit update and abort path need to release memory associated with
netdev hooks. kfree gets skipped because it mixes registration and
allocation.
Signed-off-by: Florian Westphal <fw@strlen.de>
--- /dev/null
+#!/bin/bash
+
+set -e
+
+$NFT -f - <<EOF
+table netdev t {
+ flags dormant
+
+ chain c {
+ type filter hook ingress priority 0
+ }
+}
+EOF
+
+# check abort path frees transaction
+$NFT --check -f - <<EOF
+table netdev t {
+ flags dormant
+ chain c {
+ type filter hook ingress device lo priority 0
+ }
+}
+EOF
--- /dev/null
+{
+ "nftables": [
+ {
+ "metainfo": {
+ "version": "VERSION",
+ "release_name": "RELEASE_NAME",
+ "json_schema_version": 1
+ }
+ },
+ {
+ "table": {
+ "family": "netdev",
+ "name": "t",
+ "handle": 0,
+ "flags": [
+ "dormant"
+ ]
+ }
+ },
+ {
+ "chain": {
+ "family": "netdev",
+ "table": "t",
+ "name": "c",
+ "handle": 0,
+ "type": "filter",
+ "hook": "ingress",
+ "prio": 0,
+ "policy": "accept"
+ }
+ }
+ ]
+}
--- /dev/null
+table netdev t {
+ flags dormant
+
+ chain c {
+ type filter hook ingress priority filter; policy accept;
+ }
+}