summaryrefslogtreecommitdiffstats
path: root/files/examples
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-05-24 13:25:22 +0200
committerFlorian Westphal <fw@strlen.de>2023-05-24 15:03:39 +0200
commitb422b07ab2f96436001f33dfdfd937238033c799 (patch)
tree197697a0b987a3d6daea85ea502a8c7b3a491f06 /files/examples
parentd0b8bc354a0bc12cebd8e3518fde05b01bebdcc9 (diff)
src: permit use of constant values in set lookup keys
Something like: Given: set s { type ipv4_addr . ipv4_addr . inet_service .. } something like add rule ip saddr . 1.2.3.4 . 80 @s goto c1 fails with: "Error: Can't parse symbolic invalid expressions". This fails because the relational expression first evaluates the left hand side, so when concat evaluation sees '1.2.3.4' no key context is available. Check if the RHS is a set reference, and, if so, evaluate the right hand side. This sets a pointer to the set key in the evaluation context structure which then makes the concat evaluation step parse 1.2.3.4 and 80 as ipv4 address and 16bit port number. On delinearization, extend relop postprocessing to copy the datatype from the rhs (set reference, has proper datatype according to set->key) to the lhs (concat expression). Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'files/examples')
0 files changed, 0 insertions, 0 deletions