delete chain filter testchain
# chains: add and delete base chain
-add chain filter input NF_INET_LOCAL_OUT 0
-delete chain filter input NF_INET_LOCAL_OUT 0
+add chain filter input { hook NF_INET_LOCAL_OUT 0 ; }
+delete chain filter input
# chains: can not delete chain while referenced
add chain filter testchain
add rule filter testchain handle 1 jump testchain2
delete chain filter testchain2
-rule delete filter testchain handle 1
+delete rule filter testchain handle 1
delete chain filter testchain2
delete chain filter testchain