pypacker icon indicating copy to clipboard operation
pypacker copied to clipboard

[Errno 97] Address family not supported by protocol

Open klvbdmh opened this issue 7 years ago • 1 comments

I'm trying to run an example "Send and receive packets (send/receive raw bytes)" and I got the following error:

Traceback (most recent call last):
  File "capture.py", line 6, in <module>
    psock = psocket.SocketHndl(mode=psocket.SocketHndl.MODE_LAYER_2, timeout=10)
  File "/home/user/miniconda3/lib/python3.6/site-packages/pypacker/psocket.py", line 46, in __init__
    socket.htons(SocketHndl.ETH_P_ALL))
  File "/home/user/miniconda3/lib/python3.6/socket.py", line 144, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol

I'm using the latest version: pypacker==4.3

System info:

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

klvbdmh avatar Jul 08 '18 12:07 klvbdmh

Strange, seems like IPv6 (or something else) is not supported, fallback solution is now implemented in gitlab repo at https://gitlab.com/mike01/pypacker

mike01 avatar Jul 16 '18 16:07 mike01