#!/bin/bash # support for strings/typeof in named sets. # s1 and s2 are identical, they just use different # ways for declaration. EXPECTED="table inet t { set s1 { typeof osf name elements = { \"Linux\" } } set s2 { typeof vlan id elements = { 2, 3, 103 } } set s3 { typeof meta ibrpvid elements = { 2, 3, 103 } } set s4 { typeof frag frag-off elements = { 1, 1024 } } set s5 { typeof ip option ra value elements = { 1, 1024 } } set s6 { typeof tcp option maxseg size elements = { 1, 1024 } } set s7 { typeof sctp chunk init num-inbound-streams elements = { 1, 4 } } chain c1 { osf name @s1 accept } chain c2 { ether type vlan vlan id @s2 accept } chain c5 { ip option ra value @s5 accept } chain c6 { tcp option maxseg size @s6 accept } chain c7 { sctp chunk init num-inbound-streams @s7 accept } }" set -e $NFT -f - <<< $EXPECTED