conf: Introduce PASST_LEGACY_NO_OPTIONS ifdef for legacy
Before introducing options, the default behaviour in passt mode was to forward all ports, to run in foreground and to log to stderr. Make it a bit more convenient to restore that at build time. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
647a413794
commit
b15e97cb9d
1 changed files with 12 additions and 0 deletions
12
conf.c
12
conf.c
|
@ -1144,6 +1144,18 @@ void conf(struct ctx *c, int argc, char **argv)
|
||||||
if (!*c->pasta_ifn)
|
if (!*c->pasta_ifn)
|
||||||
strncpy(c->pasta_ifn, c->ifn, IFNAMSIZ);
|
strncpy(c->pasta_ifn, c->ifn, IFNAMSIZ);
|
||||||
|
|
||||||
|
#ifdef PASST_LEGACY_NO_OPTIONS
|
||||||
|
if (c->mode == MODE_PASST) {
|
||||||
|
c->foreground = 1;
|
||||||
|
c->stderr = 1;
|
||||||
|
|
||||||
|
if (!tcp_tap) {
|
||||||
|
memset(c->tcp.port_to_tap, 0xff,
|
||||||
|
PORT_EPHEMERAL_MIN / 8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (c->mode == MODE_PASTA) {
|
if (c->mode == MODE_PASTA) {
|
||||||
if (!tcp_tap || tcp_tap == PORT_AUTO) {
|
if (!tcp_tap || tcp_tap == PORT_AUTO) {
|
||||||
ns_ports_arg.proto = IPPROTO_TCP;
|
ns_ports_arg.proto = IPPROTO_TCP;
|
||||||
|
|
Loading…
Reference in a new issue