aboutgitcodebugslistschat
path: root/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/conf.c b/conf.c
index 6ca61b7..7a3085b 100644
--- a/conf.c
+++ b/conf.c
@@ -282,9 +282,7 @@ static void conf_ports(const struct ctx *c, char optname, const char *optarg,
*mode = FWD_MODE_ALL;
/* Exclude ephemeral ports */
- for (i = 0; i < NUM_PORTS; i++)
- if (fwd_port_is_ephemeral(i))
- bitmap_set(exclude, i);
+ fwd_port_map_ephemeral(exclude);
conf_ports_range_except(c, optname, optarg, fwd,
NULL, NULL,
@@ -376,9 +374,7 @@ static void conf_ports(const struct ctx *c, char optname, const char *optarg,
if (exclude_only) {
/* Exclude ephemeral ports */
- for (i = 0; i < NUM_PORTS; i++)
- if (fwd_port_is_ephemeral(i))
- bitmap_set(exclude, i);
+ fwd_port_map_ephemeral(exclude);
conf_ports_range_except(c, optname, optarg, fwd,
addr, ifname,