Author: tjansen Date: Mon Oct 19 16:51:24 2009 New Revision: 1234 Log: Removed the make_tunnel option from the config file and the code. Modified: trunk/pisacd/cdconf.c trunk/pisacd/cdconf.h trunk/pisacd/cdmain.c trunk/pisacd/pisacd.conf Modified: trunk/pisacd/cdconf.c ============================================================================== --- trunk/pisacd/cdconf.c Mon Oct 19 16:24:00 2009 (r1233) +++ trunk/pisacd/cdconf.c Mon Oct 19 16:51:24 2009 (r1234) @@ -36,9 +36,6 @@ static void cdconf_read_port_data(cd_conf *cdconf); #ifdef REMOVE_PREAUTH_CODE static void cdconf_read_port_pasrv(cd_conf *cdconf); -#endif /* REMOVE_PREAUTH_CODE */ -static void cdconf_read_make_tunnel(cd_conf *cdconf); -#ifdef REMOVE_PREAUTH_CODE static void cdconf_read_pareq_interval(cd_conf *cdconf); static void cdconf_read_pareq_maxretry(cd_conf *cdconf); static void cdconf_read_bureq_timeout(cd_conf *cdconf); @@ -68,9 +65,6 @@ cdconf->port_data = 0; #ifdef REMOVE_PREAUTH_CODE cdconf->port_pasrv = 0; -#endif /* REMOVE_PREAUTH_CODE */ - cdconf->make_tunnel = UNDEFINED; -#ifdef REMOVE_PREAUTH_CODE cdconf->heartbeat_timeout = PISACD_DEFAULT_HEARTBEAT_TIMEOUT; cdconf->heartbeat_maxretry = PISACD_DEFAULT_HEARTBEAT_MAXRETRY; cdconf->pareq_interval = PISACD_DEFAULT_PAREQ_INTERVAL; @@ -127,11 +121,8 @@ cdconf_read_port_data(cdconf); #ifdef REMOVE_PREAUTH_CODE cdconf_read_port_pasrv(cdconf); -#endif /* REMOVE_PREAUTH_CODE */ - cdconf_read_make_tunnel(cdconf); /* cdconf_read_heartbeat_timeout(cdconf);*/ /* cdconf_read_heartbeat_maxretry(cdconf);*/ -#ifdef REMOVE_PREAUTH_CODE cdconf_read_pareq_interval(cdconf); cdconf_read_pareq_maxretry(cdconf); cdconf_read_bureq_timeout(cdconf); @@ -254,32 +245,6 @@ } #endif /* REMOVE_PREAUTH_CODE */ -/** - * Read the listening data port number from the configuration file. - * - * @param cdconf cd_conf structure where conf settings are stored - */ -static void cdconf_read_make_tunnel(cd_conf *cdconf) -{ - char tmpbuf[MAX_BUF]; - - if (cdconf->make_tunnel != UNDEFINED) - return; - - /* Determine the appropriate interface name for listening connections */ - if (pisa_cfg_get_string_value("make_tunnel", tmpbuf, sizeof(tmpbuf))) { - if (strncasecmp(tmpbuf, "yes", sizeof(tmpbuf)) == 0) { - cdconf->make_tunnel = TRUE; - } - else { - cdconf->make_tunnel = FALSE; - } - } else { - PISA_DEBUG(PL_CONFIG, "Using the default make_tunnel setting 'YES'\n"); - cdconf->make_tunnel = TRUE; - } -} - #ifdef REMOVE_PREAUTH_CODE /** * Read the pre-authentication request interval from the configuration file. Modified: trunk/pisacd/cdconf.h ============================================================================== --- trunk/pisacd/cdconf.h Mon Oct 19 16:24:00 2009 (r1233) +++ trunk/pisacd/cdconf.h Mon Oct 19 16:51:24 2009 (r1234) @@ -30,9 +30,6 @@ int port_data; /**< data port number to listen to */ #ifdef REMOVE_PREAUTH_CODE int port_pasrv; /**< port to listen to pre-auth responses */ -#endif /* REMOVE_PREAUTH_CODE */ - int make_tunnel; /**< whether to establish the tunnel */ /* TODO Why is this here WOLF */ -#ifdef REMOVE_PREAUTH_CODE int heartbeat_timeout; /**< timeout when sending heartbeat packets */ int heartbeat_maxretry; /**< max retry time when sending heartbeat packets */ int pareq_interval; /**< interval when sending pareq packets */ Modified: trunk/pisacd/cdmain.c ============================================================================== --- trunk/pisacd/cdmain.c Mon Oct 19 16:24:00 2009 (r1233) +++ trunk/pisacd/cdmain.c Mon Oct 19 16:51:24 2009 (r1234) @@ -61,7 +61,7 @@ static void cd_perf_destroy(void); #endif /* CONFIG_PISA_PERFORMANCE */ -#define OPTS "f:i:p:q:tbdvh" +#define OPTS "f:i:p:q:bdvh" /** * A set of options, including each long option and single-letter option @@ -73,7 +73,6 @@ #endif /* REMOVE_PREAUTH_CODE */ {"port_control", required_argument, NULL, 'p'}, {"port_data", required_argument, NULL, 'q'}, - {"skip_tunnel", no_argument, NULL, 't'}, {"background", required_argument, NULL, 'b'}, {"debug", no_argument, NULL, 'd'}, {"version", no_argument, NULL, 'v'}, @@ -419,18 +418,16 @@ } #endif /* REMOVE_PREAUTH_CODE */ } else { - if (cd_cfg.make_tunnel) { - if (cd_ctx.is_cd_running) { - if (FD_ISSET(cd_ctx.tunnel, &readfds)) - pisa_cd_copy_from_tun_to_sock(); + if (cd_ctx.is_cd_running) { + if (FD_ISSET(cd_ctx.tunnel, &readfds)) + pisa_cd_copy_from_tun_to_sock(); - if (FD_ISSET(cd_ctx.tund, &readfds)) - pisa_cd_copy_from_sock_to_tun(); - } + if (FD_ISSET(cd_ctx.tund, &readfds)) + pisa_cd_copy_from_sock_to_tun(); + } - if (FD_ISSET(cd_ctx.tunc, &readfds)) - pisa_ctrlhandler_dispatch(&cd_ctx.ctrlhandlers, cd_ctx.tunc); - } /* make_tunnel */ + if (FD_ISSET(cd_ctx.tunc, &readfds)) + pisa_ctrlhandler_dispatch(&cd_ctx.ctrlhandlers, cd_ctx.tunc); #ifdef REMOVE_PREAUTH_CODE if (FD_ISSET(cd_ctx.fd_pasrv, &readfds)) { @@ -756,9 +753,6 @@ case 'q': cd_cfg.port_data = atoi(optarg); break; - case 't': - cd_cfg.make_tunnel = FALSE; - break; case 'b': cd_ctx.is_bgrun = TRUE; break; @@ -794,7 +788,6 @@ "\t-i|--interface <ifname> : Use the given name as the main wlan interface.\n" "\t-p|--control-port <port> : Give a control port number to listen for incoming connections. (default: %d)\n" "\t-q|--data-port <port> : Give a data port number to listen for incoming connections. (default: %d)\n" - "\t-t|--skip-tunnel : Skip establishing PISA tunnel\n" "\t-b|--background : Run in background\n" "\t-d|--debug : Enable Debug mode\n" "\t-v|--version : Print the version number\n" Modified: trunk/pisacd/pisacd.conf ============================================================================== --- trunk/pisacd/pisacd.conf Mon Oct 19 16:24:00 2009 (r1233) +++ trunk/pisacd/pisacd.conf Mon Oct 19 16:51:24 2009 (r1234) @@ -8,9 +8,6 @@ port_data=5002; port_pasrv=5011; -# Remove this option once we remove PREAUTH -make_tunnel = "yes"; - interface_wlan = "wlan0"; preauth_request_interval = 6; preauth_request_max_retry = 8;