aboutgitcodebugslistschat
path: root/test
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2026-05-06 00:39:09 +0200
committerStefano Brivio <sbrivio@redhat.com>2026-05-07 08:06:30 +0200
commit2692ef3fa67d89076e1ad035434db9312a0b3813 (patch)
treed3224fdb657bdbd260ad0b5e9c29582f5a8c8a51 /test
parente371d347ebb764665f3acd10c804ded44d04bb60 (diff)
downloadpasst-2692ef3fa67d89076e1ad035434db9312a0b3813.tar
passt-2692ef3fa67d89076e1ad035434db9312a0b3813.tar.gz
passt-2692ef3fa67d89076e1ad035434db9312a0b3813.tar.bz2
passt-2692ef3fa67d89076e1ad035434db9312a0b3813.tar.lz
passt-2692ef3fa67d89076e1ad035434db9312a0b3813.tar.xz
passt-2692ef3fa67d89076e1ad035434db9312a0b3813.tar.zst
passt-2692ef3fa67d89076e1ad035434db9312a0b3813.zip
pesto, conf, fwd_rule: Add options and modes to add, delete, clear rules
Instead of just being able to add to the existing tables, implement an explicit --clear option to replace them, which now becomes the default behaviour, and implement explicit --add and --delete options to maintain the table and add or delete specific ports. The option --clear PIF forces the clearing of a table, instead. These options can be combined arbitrarily and are handled as sequential commands, as now described in pesto(1). If no option is given before forwarding specifiers for a matching table, the command line is interpreted as a replacement of the existing rules. To this end: - there's no protocol change, as pesto is anyway sending updated copies of the table - the forwarding table functions now include a new fwd_rule_del(), which deletes existing rule only if a matching one is found - a trivial fwd_rule_clear() is factored out from the existing conf_handler() implementation, so that it can be directly used in pesto The entry points for parsing of port specifiers now take an additional 'del' parameter which is passed down all the way before reaching the fwd_rule_add() implementation. If a rule should be deleted, at that point, fwd_rule_del() is called instead. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions