chiark / gitweb /
Build: Explicitly link against mLib or catacomb.
[tripe] / server / tun-linux.c
index 42503548b94ee2bfdf7085fbb3de9769effd1ff1..cffeb56d0e7456ffc6ae2b53b2da91418e1db86d 100644 (file)
@@ -1,13 +1,11 @@
 /* -*-c-*-
- *
- * $Id$
  *
  * Tunnel interface based on Linux TUN/TAP driver
  *
  * (c) 2003 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -46,7 +44,7 @@ struct tunnel {
   const tunnel_ops *ops;               /* Pointer to operations */
   sel_file f;                          /* Selector for TUN/TAP device */
   struct peer *p;                      /* Pointer to my peer */
-};  
+};
 
 /* --- @t_read@ --- *
  *
@@ -163,11 +161,7 @@ static void t_inject(tunnel *t, buf *b)
  */
 
 static void t_destroy(tunnel *t)
-{
-  sel_rmfile(&t->f);
-  close(t->f.fd);
-  DESTROY(t);
-}
+  { sel_rmfile(&t->f); close(t->f.fd); DESTROY(t); }
 
 const tunnel_ops tun_linux = {
   "linux",