diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-27 04:53:38 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-27 04:53:38 +0200 |
commit | e90be1577d672068878118fc61fab75e3028b56f (patch) | |
tree | c6b154f25da7ff9e6d81b7a4313599233f678cbd /src/tuntap.c | |
parent | a0e0e9898a7c1abeb4dbf6ba188a9bcaf523e003 (diff) | |
download | fastd-e90be1577d672068878118fc61fab75e3028b56f.tar fastd-e90be1577d672068878118fc61fab75e3028b56f.zip |
Move tuntap handling out of poll.c
Diffstat (limited to 'src/tuntap.c')
-rw-r--r-- | src/tuntap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tuntap.c b/src/tuntap.c index ddb93b1..53cbccd 100644 --- a/src/tuntap.c +++ b/src/tuntap.c @@ -296,7 +296,7 @@ void fastd_tuntap_open(void) { /** Reads a packet from the TUN/TAP device */ -fastd_buffer_t fastd_tuntap_read(void) { +void fastd_tuntap_handle(void) { size_t max_len = fastd_max_inner_packet(); fastd_buffer_t buffer; @@ -309,7 +309,7 @@ fastd_buffer_t fastd_tuntap_read(void) { if (len < 0) { if (errno == EINTR) { fastd_buffer_free(buffer); - return (fastd_buffer_t){}; + return; } exit_errno("read"); @@ -320,7 +320,7 @@ fastd_buffer_t fastd_tuntap_read(void) { if (multiaf_tun && conf.mode == MODE_TUN) fastd_buffer_push_head(&buffer, 4); - return buffer; + fastd_send_data(buffer); } /** Writes a packet to the TUN/TAP device */ |