fw4: refactor family selection for forwarding rules
authorJo-Philipp Wich <jo@mein.io>
Fri, 29 Apr 2022 12:48:16 +0000 (14:48 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 29 Apr 2022 12:54:31 +0000 (14:54 +0200)
commitf0cc3171690d3c0aa9e5e08128b8922d36c92add
tree49afaa7bb3ebc3ffcb18d3bd38a67ba8c563d1e3
parentb0b8122cbc055296c855a0e6445c0b64922a1874
fw4: refactor family selection for forwarding rules

Use the common `infer_family()` helper when parsing `forwarding` sections
to simplify the code. Also add some test coverage for the changed code.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
root/usr/share/ucode/fw4.uc
tests/04_forwardings/01_family_selections [new file with mode: 0644]