summaryrefslogtreecommitdiff
path: root/pythonmod
AgeCommit message (Collapse)AuthorLines
2026-07-23pythonmod: add check return value after ftell() (#1478)Petr Vaganov-1/+8
Variable 'flen', which might receive a negative value at pythonmod.c:493 by calling function 'ftell', is used without checking at pythonmod.c:508 by calling function 'fread'. Found by the static analyzer Svace (ISP RAS). Signed-off-by: Petr Vaganov <petrvaganoff@gmail.com>
2026-06-10- Fix pythonmod script read for numeric overflow.W.C.A. Wijngaards-0/+6
2026-05-27- Fix that the ratelimit is decremented on successfulW.C.A. Wijngaards-1/+2
referrals. Thanks to Qifan Zhang, Palo Alto Networks, for the report.
2025-09-30- Fix for #1344: Fix that respip and dns64 can be enabled at theW.C.A. Wijngaards-2/+2
same time, the client info is copied for attach_sub and add_sub calls. That makes respip work on dns64 synthesized answers, and also makes RPZ work with DNS64. The order for the modules is module-config: "respip dns64 validator iterator".
2025-09-23- For #1352, align with the current Python<3 code.Yorgos Thessalonikefs-34/+15
2025-09-23pythonmod: fix HANDLE_LEAK on pythonmod_initPetr Vaganov-0/+2
Found by the static analyzer Svace (ISP RAS). Handle 'script_py' is created at pythonmod.c:436 by calling function 'fopen' and lost at pythonmod.c:457,465. Signed-off-by: Petr Vaganov <petrvaganoff@gmail.com>
2025-09-02- Fix #1235: Outdated Python2 code inW.C.A. Wijngaards-15/+17
unbound/pythonmod/examples/log.py.
2024-12-02- For #1189, homogenize the input buffer size for dname_str().Yorgos Thessalonikefs-1/+1
2024-11-05- Fix for the serve expired DNSSEC information fix, it would not allowW.C.A. Wijngaards-1/+1
current delegation information be updated in cache. The fix allows current delegation and validation recursion information to be updated, but as a consequence no longer has certain expired information around for later dnssec valid expired responses.
2024-08-23- Merge patch to fix for glue that is outside of zone, withW.C.A. Wijngaards-0/+5
`harden-unverified-glue`, from Karthik Umashankar (Microsoft). Enabling this option protects the Unbound resolver against bad glue, that is unverified out of zone glue, by resolving them. It uses the records as last resort if there is no other working glue.
2024-07-03ipset-pf-support, move startup and destartup to the front of the moduleW.C.A. Wijngaards-1/+1
func block functions, modstack call deinit function names, and detect module change when no startup functions are needed.
2024-07-01Call module init init again, and new function startup and destartup.W.C.A. Wijngaards-2/+2
NULL can be used if the function is not used. Open shared ports during reload. Deinit is called during reload.
2024-07-01ipset-pf-support, fix compilation, close of pf socket.W.C.A. Wijngaards-1/+1
2024-04-25Merge pull request #1041 from NLnetLabs/stubfwd-unshareWouter Wijngaards-3/+7
Stub and Forward unshare
2024-04-25Update locking management for iter_fwd and iter_hints methods. (#1054)Yorgos Thessalonikefs-4/+4
fast reload, move most of the locking management to iter_fwd and iter_hints methods. The caller still has the ability to handle its own locking, if desired, for atomic operations on sets of different structs. Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
2024-04-15Py_NoSiteFlag is not needed since Python 3.8Petr Mensik-1/+1
Python since 3.12 prints warning about Py_NoSiteFlag is deprecated. It seems that variable is not needed since Python 3.8, since it sets in such cases directly config.site_import variable few moments later. Move using deprecated variable to versions before that flag in config could be used only. This should fix warning like: pythonmod/pythonmod.c: In function 'pythonmod_init': pythonmod/pythonmod.c:359:7: warning: 'Py_NoSiteFlag' is deprecated [-Wdeprecated-declarations] 359 | Py_NoSiteFlag = 1; | ^~~~~~~~~~~~~ In file included from /usr/include/python3.12/Python.h:48, from pythonmod/pythonmod.c:54: /usr/include/python3.12/cpython/pydebug.h:14:37: note: declared here 14 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_NoSiteFlag; | ^~~~~~~~~~~~~ https://docs.python.org/3/c-api/init.html#c.Py_NoSiteFlag
2024-04-03- fast-reload, unshared stub hints, making the structure locked, with an rwlock.W.C.A. Wijngaards-1/+5
2023-10-16- For multi Python module setups, clean previously parsed moduleGeorge Thessalonikefs-0/+30
functions in __main__'s dictionary, if any, so that only current module functions are registered.
2023-10-16- Expose the configured listening and outgoing interfaces, if any, asGeorge Thessalonikefs-2/+30
a list of strings in the Python 'config_file' class instead of the current Swig object proxy; fixes #79.
2023-10-16- Expose the script filename in the Python module environment 'mod_env'George Thessalonikefs-18/+33
instead of the config_file structure which includes the linked list of scripts in a multi Python module setup; fixes #79.
2023-10-11- Fix for #949: Fix pythonmod/ubmodule-tst.py for Python 3.x.W.C.A. Wijngaards-18/+26
2023-07-21- Cleaner failure code for callback functions in interface.i.George Thessalonikefs-50/+81
2023-07-21Merge branch 'python_add_missing_callbacks' of ↵George Thessalonikefs-0/+131
https://github.com/fhriley/unbound into fhriley-python_add_missing_callbacks
2023-07-03- Fix #906: warning: ‘Py_SetProgramName’ is deprecated.W.C.A. Wijngaards-0/+40
2023-06-29- Merge #827 from rcmcdonald91: Eliminate unnecessary Python reloadingGeorge Thessalonikefs-5/+20
which causes memory leaks.
2023-06-29- More fixes for reference counting for python module and clean upGeorge Thessalonikefs-28/+59
failure code.
2023-06-29- Fix python modules with multiple scripts, by incrementing referenceW.C.A. Wijngaards-0/+8
counts.
2023-06-11Fix: #895: pythonmodule: add all site-packages directories to sys.pathКоренберг Марк-36/+4
2023-04-26Merge branch 'nat64' of https://github.com/eqvinox/unbound into eqvinox-nat64George Thessalonikefs-2/+3
2023-02-24#827 review responseChristian McDonald-6/+7
2023-02-01set modinfo to null lastChristian McDonald-3/+3
2023-01-28Fix copyright dateR. Christian McDonald-1/+1
2023-01-19cleanup callbacks that might have been registered by Python scriptR. Christian McDonald-0/+5
2023-01-13eliminate unnecessary Python reloading which causes memory leaksChristian McDonald-5/+14
2023-01-09- Fix python module install path detection.W.C.A. Wijngaards-0/+22
2022-11-09- Complementary fix for distutils.sysconfig deprecation in Python 3.10George Thessalonikefs-10/+29
to commit 62c5039ab9da42713e006e840b7578e01d66e7f2.
2022-11-07NAT64 supportDavid Lamparter-2/+3
This implements #721. Includes documentation and some very basic tests. Please refer to doc for further detail.
2022-10-03PROXYv2 downstream support (#760)Yorgos Thessalonikefs-6/+6
2022-08-01- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.W.C.A. Wijngaards-3/+5
2022-05-12- Fix #417: prefetch and ECS causing cache corruption when usedGeorge Thessalonikefs-3/+3
together.
2022-03-01- Fix pythonmod for change in iter_dp_is_useless function prototype.W.C.A. Wijngaards-2/+3
2022-01-29- Update ratelimit code for recent serviced_query changes and moreGeorge Thessalonikefs-1/+2
accurate ratelimit calculation.
2021-11-29- Fix to make python module opt_list use opt_list_in.W.C.A. Wijngaards-2/+5
2021-11-29Merge pull request #570 from rex4539/typosWouter Wijngaards-7/+7
Fix typos
2021-11-15Make explicit whether edns options are parsed from queries or responsesTom Carpay-1/+1
2021-11-13Fix typosDimitris Apostolou-7/+7
2021-08-12- For #519: yacc and lex. And fix python bindings, and test programW.C.A. Wijngaards-2/+2
unbound-dnstap-socket.
2021-07-02- Fix #506: Python Module Seems to Leak Memory if it Experiences anW.C.A. Wijngaards-0/+5
Unhandled Exception.
2021-06-18- Fix a number of warnings reported by the gcc analyzer.W.C.A. Wijngaards-12/+39
2021-03-22- Reformat pythonmod/pythonmod_utils.{c,h}.George Thessalonikefs-113/+128