summaryrefslogtreecommitdiffstats
path: root/COPYING-GPLV2
diff options
context:
space:
mode:
authorsrijan-sivakumar <ssivakum@redhat.com>2020-07-18 05:59:09 +0530
committerRinku Kothiya <rkothiya@redhat.com>2020-09-14 20:01:45 +0000
commit93d48622d9ddb96f07a8590312c2885e11751436 (patch)
treeb8f91b36b288f0b4e650869e178e371a92b8276e /COPYING-GPLV2
parentb4cc0988d5e9a5bf354dd4c2cb254ce52546facb (diff)
Events: Socket creation after getaddrinfo and IPv4 and IPv6 packet capture
Issue: Currently, the socket creation is done prior to getaddrinfo function being invoked. This can cause mismatch in the protocol and address families of the created socket and the result of the getaddrinfo api. Also, the glustereventsd UDP server by default only captures IPv4 packets hence IPv6 packets are not even captured. Code Changes: 1. Modified the socket creation in such a way that the parameters taken in are dependent upon the result of the getaddrinfo function. 2. Created a subclass for adding address family in glustereventsd.py for both AF_INET and AF_INET6. 3. Modified addresses in the eventsapiconf.py.in Reasoning behind the approach: 1. If we are using getaddrinfo function then socket creation should happen only after we check if we received back valid addresses. Hence socket creation should come after the call to getaddrinfo 2. The listening server which pushes the events to the webhook has to listen for both IPv4 and IPv6 messages as we would not be sure as to what address family is picked in _gf_event. Fixes: #1377 Change-Id: I568dcd1a977c8832f0fef981e1f81cac7043c760 Signed-off-by: srijan-sivakumar <ssivakum@redhat.com> (cherry picked from commit 7c309928591deb8d0188793677958226ac03897a)
Diffstat (limited to 'COPYING-GPLV2')
0 files changed, 0 insertions, 0 deletions