summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/l2tp/l2tp.c
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-06-04 16:28:28 +0400
committerKozlov Dmitry <xeb@mail.ru>2012-06-04 16:28:28 +0400
commit11865d0baa7788c6a49c3f8bc0d552d2a3999bcb (patch)
treebb6e0212d634d07488096e402866a72b54ac2881 /accel-pppd/ctrl/l2tp/l2tp.c
parentcfbc9780376c463a5977c455765d73f02102fee9 (diff)
downloadaccel-ppp-11865d0baa7788c6a49c3f8bc0d552d2a3999bcb.tar.gz
accel-ppp-11865d0baa7788c6a49c3f8bc0d552d2a3999bcb.zip
Revert "implemented delayed fd close (speeds up session termination process)"
Low interface creation/deletion rate is kernel issue and should be fixed in 3.5. This reverts commit 9ae4a0151805229face3385e6c966de90c7fec29.
Diffstat (limited to 'accel-pppd/ctrl/l2tp/l2tp.c')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index c629bb3..d8a98f8 100644
--- a/accel-pppd/ctrl/l2tp/l2tp.c
+++ b/accel-pppd/ctrl/l2tp/l2tp.c
@@ -26,7 +26,6 @@
#include "crypto.h"
#include "connlimit.h"
-#include "fdtrash.h"
#include "memdebug.h"
@@ -117,6 +116,7 @@ static void l2tp_disconnect(struct l2tp_conn_t *conn)
struct l2tp_packet_t *pack;
triton_md_unregister_handler(&conn->hnd);
+ close(conn->hnd.fd);
if (conn->timeout_timer.tpd)
triton_timer_del(&conn->timeout_timer);
@@ -139,12 +139,10 @@ static void l2tp_disconnect(struct l2tp_conn_t *conn)
pthread_mutex_unlock(&l2tp_lock);
if (conn->ppp.fd != -1)
- fdtrash_add(conn->ppp.fd);
+ close(conn->ppp.fd);
if (conn->tunnel_fd != -1)
- fdtrash_add(conn->tunnel_fd);
-
- fdtrash_add(conn->hnd.fd);
+ close(conn->tunnel_fd);
triton_event_fire(EV_CTRL_FINISHED, &conn->ppp);