Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9587d75
Modernize, add tests, allow Packet to outlive the callback it's passe…
oremanj Jan 12, 2022
a53c4d0
Make ci.sh executable
oremanj Jan 12, 2022
efcf94c
Fix package name
oremanj Jan 12, 2022
5d1d123
Use newer Cython when building
oremanj Jan 12, 2022
e7d4510
Use an actual warning, and avoid it in CI
oremanj Jan 12, 2022
99c13b3
Improve & test error handling
oremanj Jan 12, 2022
ba0e8be
Suppress warning again + update README
oremanj Jan 12, 2022
c2d7ce8
Suppress warning harder
oremanj Jan 12, 2022
afcee0d
Merge pull request #74 from oremanj/updates
oremanj Jan 12, 2022
a5578d3
Misc CI and packaging updates
oremanj Jan 13, 2022
ed4a63d
Merge pull request #75 from oremanj/ci-updates
oremanj Jan 13, 2022
8d3193f
Release v0.9.0
oremanj Jan 13, 2022
ddbc12a
Merge pull request #76 from oremanj/release-v0.9.0
oremanj Jan 13, 2022
0187c89
Fixes for several open issues
oremanj Jan 13, 2022
2c782b9
CI fixes
oremanj Jan 13, 2022
62da18e
Document and test remaining attributes/methods; fix PyPy tests by not…
oremanj Jan 14, 2022
305b258
Fix CI, make COPY_META mode work
oremanj Jan 14, 2022
c7fd3e5
Fix CI on 3.8+
oremanj Jan 14, 2022
6fb345e
Merge pull request #77 from oremanj/fixes
oremanj Jan 14, 2022
53e2db3
Add a parameter NetfilterQueue(sockfd=N) for using an externally-allo…
oremanj Jan 14, 2022
6faaa7f
Add docs
oremanj Jan 14, 2022
a935aad
Merge pull request #78 from oremanj/external-fd
oremanj Jan 14, 2022
1cbea51
Make netfilterqueue a package and add type hints
oremanj Jan 14, 2022
541c9e7
Switch back to _impl and fix names
oremanj Jan 14, 2022
db80c85
Fix stub
oremanj Jan 14, 2022
e1e20d4
Don't install _impl.c
oremanj Jan 14, 2022
ebeb8a7
Merge pull request #79 from oremanj/packagify
oremanj Jan 14, 2022
c03aec2
Release v1.0.0
oremanj Jan 14, 2022
69436c1
Bump version to 1.0.0+dev post release
oremanj Jan 14, 2022
a3dedae
Merge pull request #80 from oremanj/release-v1.0.0
oremanj Jan 14, 2022
9f460d2
Check whether payload is NULL before accessing it in __str__
oremanj Apr 19, 2022
0bb948d
Merge pull request #89 from oremanj/fix-str-segfault
oremanj Apr 19, 2022
49e1681
Add Packet accessors for interface indices
oremanj Mar 1, 2023
2b6849b
Merge pull request #93 from oremanj/inoutdev
oremanj Mar 1, 2023
8467650
Update README: python-dev is no more
oremanj Mar 1, 2023
e385572
Bump version to 1.1.0 for release
oremanj Mar 1, 2023
e11aaf6
Bump version to 1.1.0+dev post release
oremanj Mar 1, 2023
542159a
Merge pull request #94 from oremanj/release-v1.1.0
oremanj May 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
Ubuntu:
name: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
timeout-minutes: 10
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
python:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- 'pypy-3.7'
- 'pypy-3.8'
- 'pypy-3.9'
check_lint: ['0']
extra_name: ['']
include:
- python: '3.9'
check_lint: '1'
extra_name: ', check lint'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }}
- name: Run tests
run: ./ci.sh
env:
CHECK_LINT: '${{ matrix.check_lint }}'
# Should match 'name:' up above
JOB_NAME: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
25 changes: 24 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
v0.8.1 30 Jan 2017
v1.1.0, 1 Mar 2023
Add Packet accessors for {indev, outdev, physindev, physoutdev} interface indices

v1.0.0, 14 Jan 2022
Propagate exceptions raised by the user's packet callback
Avoid calls to 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()
Handle signals received when run() is blocked in recv()
Accept packets in COPY_META mode, only failing on an attempt to access the payload
Add a parameter NetfilterQueue(sockfd=N) that uses an already-opened Netlink socket
Add type hints
Remove the Packet.payload attribute; it was never safe (treated as a char* but not NUL-terminated) nor documented, but was exposed in the API (perhaps inadvertently).

v0.9.0, 12 Jan 2022
Improve usability when Packet objects are retained past the callback
Add Packet.retain() to save the packet contents in such cases
Eliminate warnings during build on py3
Add CI and basic test suite
Raise a warning, not an error, if we don't get the bufsize we want
Don't allow bind() more than once on the same NetfilterQueue, since that would leak the old queue handle
** This will be the last version with support for Python 2.7. **

v0.8.1, 30 Jan 2017
Fix bug #25- crashing when used in OUTPUT or POSTROUTING chains

v0.8, 15 Dec 2016
Expand Down
8 changes: 3 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include *.txt
include *.rst
include *.c
include *.pyx
include *.pxd
include LICENSE.txt README.rst CHANGES.txt
recursive-include netfilterqueue *.py *.pyx *.pxd *.c *.pyi py.typed
recursive-include tests *.py
Loading