diff -pNaru5 trueport-6.8.0/pkt_forwarding.c trueport-6.8.3/pkt_forwarding.c --- trueport-6.8.0/pkt_forwarding.c 2016-11-03 08:53:58.000000000 -0400 +++ trueport-6.8.3/pkt_forwarding.c 2017-05-10 15:19:10.000000000 -0400 @@ -628,12 +628,12 @@ void forward_frame( forwarding_info_t * if (UseNewPktFwdLogic(pInfo) ) { // if theres a current data length then setup data pkt count if ( (pInfo->pCurrDataPkt != NULL) && pInfo->curr_data_count) { - *pInfo->pCurrDataPkt = (unsigned char)(((htons((uint16_t)pInfo->curr_data_count))>> 8) & 0xFF); - *(pInfo->pCurrDataPkt+1) = (unsigned char)((htons((uint16_t)pInfo->curr_data_count)) & 0xFF); + *pInfo->pCurrDataPkt = (unsigned char)((((uint16_t)pInfo->curr_data_count)>> 8) & 0xFF); + *(pInfo->pCurrDataPkt+1) = (unsigned char)(((uint16_t)pInfo->curr_data_count) & 0xFF); } else // if no current data then strip of pkt header { pInfo->count -= TPPKT_HDR_SIZE; } diff -pNaru5 trueport-6.8.0/pkt_forwarding.h trueport-6.8.3/pkt_forwarding.h --- trueport-6.8.0/pkt_forwarding.h 2016-11-03 08:53:58.000000000 -0400 +++ trueport-6.8.3/pkt_forwarding.h 2017-05-10 15:19:10.000000000 -0400 @@ -93,12 +93,12 @@ typedef struct forwarding_info { unsigned char dscmd; // indicate in-line commands that need to put in pkt fwd buffer // forwarding buffer unsigned char *char_buf_ptr; int count; - unsigned long data_count; // count of only the data - unsigned long curr_data_count; // current data pkt data count when using new pkt fwd logic + unsigned short data_count; // count of only the data + unsigned short curr_data_count; // current data pkt data count when using new pkt fwd logic unsigned char *pCurrDataPkt; // this a pointer to the current data pkt unsigned char char_buf[MAX_PKT_FWD_BUF_SIZE]; int write_blocked; } forwarding_info_t; diff -pNaru5 trueport-6.8.0/ptyx/ptym.c trueport-6.8.3/ptyx/ptym.c --- trueport-6.8.0/ptyx/ptym.c 2016-11-03 08:53:58.000000000 -0400 +++ trueport-6.8.3/ptyx/ptym.c 2017-05-10 15:19:10.000000000 -0400 @@ -392,11 +392,15 @@ static int ptyx_master_ioctl(struct tty_ ptyx_print(PTYX_DEBUG_IOCTL, ("ptyx_master_ioctl(%d): TCGETS, SLAVE NOT OPEN, returning default termios\n", ptyx_info->line)); // slave not open so use the slave's default termios tmp_termios = &ptyx_info->s_driver->init_termios; } #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)) // Greater than 2.6.23 - if (kernel_termios_to_user_termios((struct termios2 *)arg, tmp_termios)) +#ifdef TCGETS2 + if (kernel_termios_to_user_termios_1((struct termios *)arg, tmp_termios)) +#else + if (kernel_termios_to_user_termios((struct termios *)arg, tmp_termios)) +#endif #else if (kernel_termios_to_user_termios((struct termios *)arg, tmp_termios)) #endif { ptyx_print(PTYX_DEBUG_IOCTL, ("ptyx_master_ioctl(%d): return -EFAULT\n", ptyx_info->line)); diff -pNaru5 trueport-6.8.0/README trueport-6.8.3/README --- trueport-6.8.0/README 2016-11-03 08:53:58.000000000 -0400 +++ trueport-6.8.3/README 2017-05-10 15:19:10.000000000 -0400 @@ -1,12 +1,12 @@ ============================================================================ Perle TruePort Daemon and Driver for Linux - Copyright (C) 2004-2016, Perle Systems Limited + Copyright (C) 2004-2017, Perle Systems Limited ============================================================================= - Release : 6.8.0 - Date : September 2016 + Release : 6.8.3 + Date : May 2017 O/S Compatibility : Linux Versions 2.6.x, 3.x, 4.x ============================================================================= Introduction: @@ -134,10 +134,13 @@ Known Issues: Release History: ================ Version Description ------- ----------- +6.8.3 * Fix stack corruption issue in trueportd +6.8.2 * Fix issue with packet idle timeout forwarding option not working +6.8.1 * Fix issue with keep alive not working correctly 6.8.0 * Maintenance release * fixed issue with stty settings not being sent to the IOLAN 6.7.10 * Fix to work with 4.6.x kernels 6.7.9 * Fix for tty lockup while waiting for the TCP connection during an open. diff -pNaru5 trueport-6.8.0/tp.h trueport-6.8.3/tp.h --- trueport-6.8.0/tp.h 2016-11-03 08:53:58.000000000 -0400 +++ trueport-6.8.3/tp.h 2017-05-10 15:19:10.000000000 -0400 @@ -1,18 +1,18 @@ /****************************************************************** Module: tp.h Description: Device Server Protocol Definitions for TruePort - Copyright (c) 1999-2015 Perle Systems Limited. All rights reserved. + Copyright (c) 1999-2017 Perle Systems Limited. All rights reserved. *******************************************************************/ #ifndef _TP_H #define _TP_H -#define TP_VERSION "6.8.0" +#define TP_VERSION "6.8.3" #if defined(CONFIG_PPC64) || defined(CONFIG_SPARC64) #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)) #include #define TP_USE_SOUNDCARD_IOCTLS diff -pNaru5 trueport-6.8.0/trueportd.c trueport-6.8.3/trueportd.c --- trueport-6.8.0/trueportd.c 2016-11-03 08:53:58.000000000 -0400 +++ trueport-6.8.3/trueportd.c 2017-05-10 15:19:10.000000000 -0400 @@ -452,11 +452,11 @@ int main(int argc, char **argv) trace(tl_error, "TCP port not specified\n"); exit(-1); } trace(tl_status, "TruePort starting Version %s on port %d", TP_VERSION, tcp_port); - trace(tl_status, " - (c) 1999-2010, Perle Systems Limited\n" ); + trace(tl_status, " - (c) 1999-2017, Perle Systems Limited\n" ); // if client I/O type name defined then set enumeration value if (io_type_name) { if (!strcmp(io_type_name, IOMBASCIIarg)) @@ -814,14 +814,18 @@ int main(int argc, char **argv) // only do keep alive logic if in data transfer state if ( IsNoUDP() && (state == s_data_transfer) ) { // if we've already sent one without a response then close connection // we will ignore keep-alive expiring if we are blocked on tty writes - if (keepalive_sent && !tty_write_blocked) +//debug-gps if (keepalive_sent && !tty_write_blocked) + if (keepalive_sent) { - trace(tl_info, "No keep-alive response, Closing connection\n"); - close_connection(); + if (!tty_write_blocked) //debug-gps + { + trace(tl_info, "No keep-alive response, Closing connection\n"); + close_connection(); + } keepalive_sent = 0; } else { ret = write_dserver_imm_ctrl(dserver_fd, DS_UDP_KEEP_ALIVE, 0); @@ -830,11 +834,14 @@ int main(int argc, char **argv) trace(tl_error, "Error sending Keep-alive immediate cmd, closing connection\n"); close_connection(); } else { - keepalive_sent = 1; + if (!tty_write_blocked) //debug-gps + { + keepalive_sent = 1; + } } } } // otherwise send UDP keep-alive // only do keep alive logic if in data transfer satae