diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2025-12-12 18:10:35 +1100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-12-12 22:38:56 +0100 |
| commit | 35fa86a7871767d6a382b13e71c429abf47f88ab (patch) | |
| tree | e69bea7d41f4e24b7b243574203263b446561638 | |
| parent | 5be1a224d35991ac491e3da851e42c5965fbc5d7 (diff) | |
| download | passt-master.tar passt-master.tar.gz passt-master.tar.bz2 passt-master.tar.lz passt-master.tar.xz passt-master.tar.zst passt-master.zip | |
We call fwd_scan_ports_init() at (almost) the end of conf(). It's a bit
odd to do actual work from a function that's ostensibly about getting our
configuration. It's not the only instance of this, but to make things a
bit clearer move the call to main(), right after flow_init().
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
| -rw-r--r-- | conf.c | 2 | ||||
| -rw-r--r-- | passt.c | 1 |
2 files changed, 1 insertions, 2 deletions
@@ -2144,8 +2144,6 @@ void conf(struct ctx *c, int argc, char **argv) if (!c->udp.fwd_out.mode) c->udp.fwd_out.mode = fwd_default; - fwd_scan_ports_init(c); - if (!c->quiet) conf_print(c); } @@ -396,6 +396,7 @@ int main(int argc, char **argv) die_perror("Failed to get CLOCK_MONOTONIC time"); flow_init(); + fwd_scan_ports_init(&c); if ((!c.no_udp && udp_init(&c)) || (!c.no_tcp && tcp_init(&c))) passt_exit(EXIT_FAILURE); |
