diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2026-04-10 11:02:48 +1000 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-04-15 23:31:34 +0200 |
| commit | de8ebc5dd9ce53d632390edf44cabeb04c7e2f98 (patch) | |
| tree | 9be32a710f4ba0423785ad66a1c465cef8a46796 /doc | |
| parent | 4d8aa0a29a6bd463987b28ae9885f70d780fabea (diff) | |
| download | passt-de8ebc5dd9ce53d632390edf44cabeb04c7e2f98.tar passt-de8ebc5dd9ce53d632390edf44cabeb04c7e2f98.tar.gz passt-de8ebc5dd9ce53d632390edf44cabeb04c7e2f98.tar.bz2 passt-de8ebc5dd9ce53d632390edf44cabeb04c7e2f98.tar.lz passt-de8ebc5dd9ce53d632390edf44cabeb04c7e2f98.tar.xz passt-de8ebc5dd9ce53d632390edf44cabeb04c7e2f98.tar.zst passt-de8ebc5dd9ce53d632390edf44cabeb04c7e2f98.zip | |
conf: Simplify handling of default forwarding mode
For passt, the default forwarding mode is "none", which falls out naturally
from the other handling: if we don't get any options, we get empty
forwarding tables, which corresponds to "none" behaviour. However, for
pasta the default is "auto". This is handled a bit oddly: in conf_ports()
we set the mode variable, but don't set up the rules we need for "auto"
mode. Instead we want until nearly the end of conf() and if the mode is
FWD_MODE_AUTO or unset, we make conf_ports_range_except() calls to set up
the "auto" rules.
Simplify this a bit, by creating the rules within conf_ports() itself when
we parse -[tuTU] auto. For the case of no forwarding options we call
into conf_ports() itself with synthetic arguments. As well as making the
code a little shorter, this makes it more obvious that giving no arguments
really is equivalent to -[tuTU] auto.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions
