Adding type, plain hook's name and priority keyword.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
#! nft -f
#
add table ip filter
-add chain ip filter output { hook NF_INET_LOCAL_OUT 0 ; }
+add chain ip filter output { type filter hook output priority 0 ; }
add chain ip filter chain1
add rule ip filter chain1 counter
#! nft -f
add table ip filter
-add chain ip filter output { hook NF_INET_LOCAL_OUT 0 ; }
+add chain ip filter output { type filter hook output priority 0 ; }
# ct: state
add rule ip filter output ct state new,established counter
#! nft -f
add table ip filter
-add chain ip filter output { hook NF_INET_LOCAL_OUT 0 ; }
+add chain ip filter output { type filter hook output priority 0 ; }
# meta: skb len
add rule ip filter output meta length 1000 counter
#! nft -f
add table bridge filter
-add chain bridge filter output { hook NF_INET_LOCAL_OUT 0 ; }
+add chain bridge filter output { type filter hook output priority 0 ; }
# LL protocol
add rule bridge filter output eth type 0x0800 counter
delete table filter
add table ip filter
-add chain ip filter output { hook NF_INET_LOCAL_IN 0; }
+add chain ip filter output { type filter hook input priority 0; }
# IP address
add rule ip filter output ip daddr 192.168.0.1 counter
#! nft -f
add table ip6 filter
-add chain ip6 filter output { hook NF_INET_LOCAL_OUT 0 ; }
+add chain ip6 filter output { type filter hook output priority 0 ; }
# IP address
add rule ip6 filter output ip6 daddr 2001:6f8:974::1 counter
delete chain filter testchain
# chains: add and delete base chain
-add chain filter input { hook NF_INET_LOCAL_OUT 0 ; }
+add chain filter input { type filter hook input priority 0 ; }
delete chain filter input
# chains: can not delete chain while referenced
#! nft -f
add table ip filter
-add chain ip filter input NF_INET_LOCAL_IN 0
+add chain ip filter input { type filter hook input priority 0; }
# mac source
add rule ip filter input @ll,48,48 00:15:e9:f0:10:f8 counter
#! nft -f
add table filter
-add chain filter output { hook NF_INET_LOCAL_OUT 0 ; }
+add chain filter output { type filter hook output priority 0 ; }
# set: IP addresses
add rule filter output ip daddr { \
#! nft -f
add table ip filter
-add chain ip filter output NF_INET_LOCAL_OUT 0
+add chain ip filter output { type filter hook output priority 0; }
add rule ip filter output log saddr "prefix" group 0 counter
#
add table ip filter
-add chain ip filter input { hook NF_INET_LOCAL_IN 0; }
+add chain ip filter input { type filter hook input priority 0; }
add chain ip filter chain1
add filter chain1 counter