diff options
author | Chaitanya Pratapa <cpratapa@codeaurora.org> | 2020-08-06 12:14:25 -0700 |
---|---|---|
committer | Chaitanya Pratapa <cpratapa@codeaurora.org> | 2020-08-09 14:40:18 -0700 |
commit | 330317a31a848a32dd52668907acf6055bd02794 (patch) | |
tree | 402dd4854465cd9e795c77b350f7deb9de2de68f /ipacm | |
parent | 6facc43568f6de2ca4142bb497077639c83db7cd (diff) | |
download | ipacfg-mgr-330317a31a848a32dd52668907acf6055bd02794.tar.gz |
ipacm: Fix to ignore ENOMSG error from nfct_catch
ENOMSG is returned when the conntrack message received
has a non zero pid value. Idea is to handle only messages
coming from Kernel which has 0 pid value.
Change-Id: Ib1934c82595b980016e98646f34797f9001c51ab
Diffstat (limited to 'ipacm')
-rw-r--r-- | ipacm/src/IPACM_ConntrackClient.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ipacm/src/IPACM_ConntrackClient.cpp b/ipacm/src/IPACM_ConntrackClient.cpp index 24f95a3..dabd8e6 100644 --- a/ipacm/src/IPACM_ConntrackClient.cpp +++ b/ipacm/src/IPACM_ConntrackClient.cpp @@ -493,12 +493,18 @@ void* IPACM_ConntrackClient::TCPRegisterWithConnTrack(void *) blocks waiting for events. */ IPACMDBG("Waiting for events\n"); +ctcatch: ret = nfct_catch(pClient->tcp_hdl); - if(ret == -1) + if((ret == -1) && (errno != ENOMSG)) { - IPACMERR("(%d)(%s)\n", ret, strerror(errno)); + IPACMERR("(%d)(%d)(%s)\n", ret, errno, strerror(errno)); return NULL; } + else + { + IPACMDBG("ctcatch ret:%d, errno:%d\n", ret, errno); + goto ctcatch; + } IPACMDBG("Exit from tcp thread\n"); @@ -579,14 +585,14 @@ void* IPACM_ConntrackClient::UDPRegisterWithConnTrack(void *) /* Block to catch events from net filter connection track */ ctcatch: ret = nfct_catch(pClient->udp_hdl); - if(ret == -1) + if((ret == -1) && (errno != ENOMSG)) { - IPACMDBG("(%d)(%s)\n", ret, strerror(errno)); + IPACMDBG("(%d)(%d)(%s)\n", ret, errno, strerror(errno)); return NULL; } else { - IPACMDBG("ctcatch ret:%d\n", ret); + IPACMDBG("ctcatch ret:%d, errno:%d\n", ret, errno); goto ctcatch; } |