X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/72917fe7c663aced54f7e1185b7b72ba59aea73c..5fb10b44d547dfcb3612b85e7115355301535ca0:/server/tun-unet.c diff --git a/server/tun-unet.c b/server/tun-unet.c index bdf23fe4..2d11ca0f 100644 --- a/server/tun-unet.c +++ b/server/tun-unet.c @@ -1,13 +1,11 @@ /* -*-c-*- - * - * $Id$ * * Tunnel interface based on Linux Usernet * * (c) 2001 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Trivial IP Encryption (TrIPE). * @@ -15,12 +13,12 @@ * 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. @@ -127,7 +125,7 @@ static tunnel *t_create(peer *p, char **ifn) if (ioctl(t->f.fd, UNIOCGINFO, &uni)) { a_warn("TUN", "-", "unet", "getinfo-error", "?ERRNO", A_END); - return (""); + return (0); } *ifn = xstrdup(uni.uni_ifname); T( trace(T_TUNNEL, "tun-unet: attached interface %s to peer `%s'", @@ -164,11 +162,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_unet = { "unet",