diff options
author | Skylar Chang <chiaweic@codeaurora.org> | 2013-06-03 16:19:30 -0700 |
---|---|---|
committer | Skylar Chang <chiaweic@codeaurora.org> | 2013-06-04 10:32:05 -0700 |
commit | 3342e4870bb5b7ec5c2b10f37df23cf23b6b923b (patch) | |
tree | 6a40a1356d4fef0a8a6894f27a7cede56ca19220 /ipacm/src/IPACM_ConntrackListener.cpp | |
parent | 366a700f3afb31fe15a273f8a1581519ab846abe (diff) | |
download | ipacfg-mgr-3342e4870bb5b7ec5c2b10f37df23cf23b6b923b.tar.gz |
1. update timeout for both tcp and udp connections
2. To update udp connections timeout value use ip_conntrack_udp_timeout_stream
3. To update tcp connection timeout value use ip_conntrack_tcp_timeout_established
4. Start inotify thread to read update udp/tcp timeout values"
Change-Id: I383e1c9b0b142dc9ad4d630d9f4d1149ccbc97f2
Diffstat (limited to 'ipacm/src/IPACM_ConntrackListener.cpp')
-rwxr-xr-x[-rw-r--r--] | ipacm/src/IPACM_ConntrackListener.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/ipacm/src/IPACM_ConntrackListener.cpp b/ipacm/src/IPACM_ConntrackListener.cpp index da0c732..5d61bc2 100644..100755 --- a/ipacm/src/IPACM_ConntrackListener.cpp +++ b/ipacm/src/IPACM_ConntrackListener.cpp @@ -278,7 +278,7 @@ void IPACM_ConntrackListener::TriggerWANUp(void *in_param) int IPACM_ConntrackListener::CreateNatThreads(void) { int ret; - pthread_t tcp_thread = 0, udp_thread = 0, udpcto_thread = 0; + pthread_t tcp_thread = 0, udp_thread = 0, udpcto_thread = 0, to_monitor_thread = 0; if(isCTReg == false) { @@ -322,6 +322,19 @@ int IPACM_ConntrackListener::CreateNatThreads(void) IPACMDBG("created upd conn timeout thread\n"); } + if(!to_monitor_thread) + { + ret = pthread_create(&to_monitor_thread, NULL, IPACM_ConntrackClient::TCPUDP_Timeout_monitor, NULL); + if(0 != ret) + { + IPACMERR("unable to create tcp/udp timeout monitor thread\n"); + PERROR("unable to create tcp/udp timeout monitor\n"); + goto error; + } + + IPACMDBG("created tcp/udp timeout monitor thread\n"); + } + isCTReg = true; } @@ -347,6 +360,11 @@ error: pthread_cancel(udpcto_thread); } + if(to_monitor_thread) + { + pthread_cancel(to_monitor_thread); + } + return -1; } |