Author: tjansen Date: Wed Oct 28 14:23:35 2009 New Revision: 1379 Log: Renamed fd_pisa_tunnel_name to tunnel_device_name. fd is misleading, as it is not the file descriptor (int) but the device name (char[]). Modified: trunk/pisasd/sdctx.c trunk/pisasd/sdctx.h trunk/pisasd/sdmain.c Modified: trunk/pisasd/sdctx.c ============================================================================== --- trunk/pisasd/sdctx.c Wed Oct 28 14:10:35 2009 (r1378) +++ trunk/pisasd/sdctx.c Wed Oct 28 14:23:35 2009 (r1379) @@ -35,6 +35,8 @@ sdctx->tunnel= -1; sdctx->fd_pisaconf = -1; + sdctx->tunnel_device_name[0] = 0; + sdctx->ctrlhandlers = NULL; sdctx->natlist = NULL; sdctx->conlist = NULL; Modified: trunk/pisasd/sdctx.h ============================================================================== --- trunk/pisasd/sdctx.h Wed Oct 28 14:10:35 2009 (r1378) +++ trunk/pisasd/sdctx.h Wed Oct 28 14:23:35 2009 (r1379) @@ -49,8 +49,9 @@ int fd_pisaconf; /** - * File descriptor for the pisa tunnel device */ - char fd_pisa_tunnel_name[IFNAMSIZ]; + * Name of the pisa tunnel device + */ + char tunnel_device_name[IFNAMSIZ]; /** * Control handler functions. Modified: trunk/pisasd/sdmain.c ============================================================================== --- trunk/pisasd/sdmain.c Wed Oct 28 14:10:35 2009 (r1378) +++ trunk/pisasd/sdmain.c Wed Oct 28 14:23:35 2009 (r1379) @@ -445,8 +445,8 @@ /* create the tunnel device and assign an IP address */ inet_pton(AF_INET, "255.255.255.0", &netmask); - sd_ctx.tunnel = pisa_tunnel_open_tundev(sd_ctx.fd_pisa_tunnel_name, IFNAMSIZ); - pisa_tunnel_configure_main(sd_ctx.fd_pisa_tunnel_name, &sd_cfg.ipaddr, &netmask, MTU_TUN); + sd_ctx.tunnel = pisa_tunnel_open_tundev(sd_ctx.tunnel_device_name, IFNAMSIZ); + pisa_tunnel_configure_main(sd_ctx.tunnel_device_name, &sd_cfg.ipaddr, &netmask, MTU_TUN); /* Initialize the scheduler */ pisa_sched_init(&sd_ctx.scheduler); @@ -459,7 +459,7 @@ { PISA_INFO("\nShutting down...\n"); - pisa_tunnel_remove_firewall_rules(sd_ctx.fd_pisa_tunnel_name); + pisa_tunnel_remove_firewall_rules(sd_ctx.tunnel_device_name); pisa_cfg_authorized_hosts_cleanup(); pisa_ctrlhandler_cleanup(&sd_ctx.ctrlhandlers);