aboutgitcodebugslistschat
path: root/fwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fwd.c')
-rw-r--r--fwd.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fwd.c b/fwd.c
index c0a6ada..042158c 100644
--- a/fwd.c
+++ b/fwd.c
@@ -389,13 +389,7 @@ static int fwd_sync_one(const struct ctx *c, uint8_t pif, unsigned idx,
continue;
}
- if (rule->proto == IPPROTO_TCP)
- fd = tcp_listen(c, pif, idx, addr, ifname, port);
- else if (rule->proto == IPPROTO_UDP)
- fd = udp_listen(c, pif, idx, addr, ifname, port);
- else
- assert(0);
-
+ fd = pif_listen(c, rule->proto, pif, addr, ifname, port, idx);
if (fd < 0) {
char astr[INANY_ADDRSTRLEN];