summaryrefslogtreecommitdiffstats
path: root/src/tuntap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tuntap.c')
-rw-r--r--src/tuntap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tuntap.c b/src/tuntap.c
index c75c281..d638611 100644
--- a/src/tuntap.c
+++ b/src/tuntap.c
@@ -25,6 +25,7 @@
#include "fastd.h"
+#include "poll.h"
#include <fcntl.h>
#include <net/if.h>
@@ -101,6 +102,8 @@ void fastd_tuntap_open(fastd_context_t *ctx) {
if (close(ctl_sock))
pr_error_errno(ctx, "close");
+ fastd_poll_set_fd_tuntap(ctx, ctx->tunfd);
+
pr_debug(ctx, "tun/tap device initialized.");
}
@@ -201,6 +204,8 @@ void fastd_tuntap_open(fastd_context_t *ctx) {
exit_bug(ctx, "invalid mode");
}
+ fastd_poll_set_fd_tuntap(ctx, ctx->tunfd);
+
pr_debug(ctx, "tun/tap device initialized.");
}
@@ -268,6 +273,8 @@ void fastd_tuntap_open(fastd_context_t *ctx) {
exit_bug(ctx, "invalid mode");
}
+ fastd_poll_set_fd_tuntap(ctx, ctx->tunfd);
+
pr_debug(ctx, "tun device initialized.");
}