Joshua Oreman
53e2db3cd2
Add a parameter NetfilterQueue(sockfd=N) for using an externally-allocated netlink socket
...
The chief use case for this is when `sockfd` was allocated in a different network namespace and passed to the current process over a UNIX domain socket or similar. It allows the current process to use netfilterqueue to manage traffic in a different network namespace.
2022-01-13 19:06:48 -07:00
Joshua Oreman
305b258a48
Fix CI, make COPY_META mode work
2022-01-13 17:19:28 -07:00
Joshua Oreman
62da18ee37
Document and test remaining attributes/methods; fix PyPy tests by not calling unbind() from tp_dealloc; misc other cleanups
2022-01-13 17:09:51 -07:00
Joshua Oreman
0187c89611
Fixes for several open issues
...
Propagate exceptions raised by the user's packet callback -- fixes #31 , #50
Warn about exceptions raised by the packet callback during queue unbinding
Raise an error if a packet verdict is set after its parent queue is closed
set_payload() now affects the result of later get_payload() -- fixes #30
Handle signals received when run() is blocked in recv() -- fixes #65
2022-01-13 03:14:43 -07:00
Joshua Oreman
9587d75aff
Modernize, add tests, allow Packet to outlive the callback it's passed to
2022-01-11 21:28:21 -07:00
Yiannis Tsiouris
b55344e288
Expose packet's HW addr
2016-11-08 13:14:40 +02:00
Matt Fox
ccb353011a
Add run_socket, which uses socket.recv so that gevent can monkeypatch it. Fixes #5
2016-06-27 23:48:53 -07:00
Matt Fox
2960dc3401
Use nfq_set_verdict2 instead of nfq_set_verdict_mark, like the libnetfilter_queue documentation says to do.
2016-06-27 21:27:12 -07:00
Matt Fox
30b7a99140
Merge branch 'master' of git://github.com/brian-goldman/python-netfilterqueue into brian-goldman-master
...
Conflicts:
netfilterqueue.c
netfilterqueue.pxd
netfilterqueue.pyx
2016-06-27 20:46:50 -07:00
Matt Fox
c88de1ec51
Merge branch 'master' of git://github.com/dave2492/python-netfilterqueue into dave2492-master
...
Conflicts:
netfilterqueue.c
netfilterqueue.pxd
netfilterqueue.pyx
2016-06-27 20:36:00 -07:00
Brian Goldman
b14fa6484d
Support asynchronous packet handling.
2016-03-18 16:54:36 -07:00
Dave Benson
f4e3f0936d
Added recv skip of ENOBUFS, also set of rcv socklen
2015-08-06 16:26:40 -04:00
lilydjwg
a31c9a67db
cleanup trailing whitespace
2015-05-16 15:26:41 +08:00
lilydjwg
a008498677
compatible with Python 3
2015-05-16 15:26:11 +08:00
Fen Qin
6b8be8a5ec
add get_mark
2013-04-15 11:30:35 +08:00
Fen Qin
26ff0e7844
add repeat to packet; release 0.5
2013-04-03 19:55:51 +08:00
Fen Qin
d379e7a57f
implement set_payload
2012-12-24 11:17:54 +08:00
Matt Fox
be8ddc6219
Specify any callback, no more use by inheritance
...
Change version to 0.3.0
Update and bugfixes in readme.rst
2011-10-14 14:14:25 -07:00
Matt
f6ef533393
Add API to README.
2011-05-13 09:23:17 -07:00
Matt
a3676c4394
Add details to README.
2011-05-13 08:42:05 -07:00
Matt Fox
09a000ac50
Initial commit
2011-05-12 13:45:14 -07:00