You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/root/test.py", line 5, in <module>
ipset.add(
File "/usr/local/lib/python3.9/dist-packages/pyroute2/ipset.py", line 502, in add
return self._add_delete_test(
File "/usr/local/lib/python3.9/dist-packages/pyroute2/ipset.py", line 441, in _add_delete_test
return self.request(
File "/usr/local/lib/python3.9/dist-packages/pyroute2/ipset.py", line 159, in request
self.nlm_request(
File "/usr/local/lib/python3.9/dist-packages/pyroute2/netlink/nlsocket.py", line 822, in nlm_request
return tuple(self._genlm_request(*argv, **kwarg))
File "/usr/local/lib/python3.9/dist-packages/pyroute2/netlink/nlsocket.py", line 1124, in nlm_request
self.put(msg, msg_type, msg_flags, msg_seq=msg_seq)
File "/usr/local/lib/python3.9/dist-packages/pyroute2/netlink/nlsocket.py", line 389, in put
self.sendto_gate(msg, addr)
File "/usr/local/lib/python3.9/dist-packages/pyroute2/netlink/nlsocket.py", line 1056, in sendto_gate
msg.encode()
File "/usr/local/lib/python3.9/dist-packages/pyroute2/netlink/__init__.py", line 1245, in encode
offset = self.encode_nlas(offset)
File "/usr/local/lib/python3.9/dist-packages/pyroute2/netlink/__init__.py", line 1566, in encode_nlas
nla_instance.encode()
File "/usr/local/lib/python3.9/dist-packages/pyroute2/netlink/__init__.py", line 1245, in encode
offset = self.encode_nlas(offset)
File "/usr/local/lib/python3.9/dist-packages/pyroute2/netlink/__init__.py", line 1566, in encode_nlas
nla_instance.encode()
File "/usr/local/lib/python3.9/dist-packages/pyroute2/netlink/__init__.py", line 1242, in encode
offset, diff = self.ft_encode(offset)
File "/usr/local/lib/python3.9/dist-packages/pyroute2/netlink/__init__.py", line 1732, in ft_encode
struct.pack_into(efmt, self.data, offset, value)
struct.error: required argument is not an integer
I try to add a record of type hash:net,port for ICMP, here is my shell code
aclblacklist is
It works well. But I try to use pyroute2.ipset, it gives me a strange answer. Here is my python code
with error
Here is fixed
The text was updated successfully, but these errors were encountered: