1356 Commits

Author SHA1 Message Date
Thomas Bernard
302f34615b update miniupnpd/Changelog.txt 2025-01-10 23:16:05 +01:00
BERNARD Thomas
78fbd18000 miniupnpd/netfilter_nft: properly delete the filter_rule
also add a few logs

fixes #791
2025-01-10 23:04:02 +01:00
Thomas Bernard
6cf5f4cca5 nftnlrdr.c: add debug output in delete_redirect_and_filter_rules() 2025-01-10 23:04:02 +01:00
Thomas Bernard
a799837371
fix get_redirect_rule_by_index() for OpenBSD >= 7.4
see https://github.com/miniupnp/miniupnp/pull/796#discussion_r1907994368

fixes #796
2025-01-09 01:47:30 +01:00
Thomas Bernard
b2ab395adb miniupnpd/Changelog.txt: update according to c578c18dbc5bcb5341e0161b23ee204f43bd9374 2025-01-09 01:46:16 +01:00
Michael Nickerson
c578c18dbc Properly detect route fix
This changed on OpenBSD 6.6, include <sys/param.h> and check
the OpenBSD define against 201911 or greater
2025-01-06 01:18:48 +01:00
Thomas BERNARD
0f5cff8835
Merge pull request #797 from qinghon/master
miniupnpd: bind ssdp notify and pcp with v6 to device
2025-01-05 04:39:30 +01:00
qinghon
9c9ab68488 miniupnpd: fix setsockopt bind_to_device buf len 2025-01-05 11:20:26 +08:00
Thomas Bernard
a3127fa16c
miniussdp.c: fix a runtime warning
thanks to @Darkshadow2 #796
2025-01-05 03:18:48 +01:00
Thomas Bernard
a567ce6747
fix comparaison between ext_if_name and ext_if_name6
if both are defined in the miniupnpd.conf file with the same value :
ext_ifname=eth0
ext_ifname6=eth0
2025-01-05 02:26:00 +01:00
qinghon
06eab75c46 miniupnpd: bind ssdp notify and pcp with v6 to device 2025-01-04 22:47:06 +08:00
Thomas Bernard
0ff36e5397 miniupnpd/configure: use pkg-config for detecting libuuid with OpenWrt as well
see #783
2024-10-09 22:48:54 +02:00
Thomas Bernard
6341710d51 miniupnpd: update man page (-S0 instead of -S)
see #780
2024-10-06 23:40:41 +02:00
Thomas Bernard
214464d8db
(c) 2024 2024-10-06 23:23:39 +02:00
Thomas Bernard
76111956a9 miniupnpd/Changelog.txt: update (Rework the buildsystem + systemd integration)
see https://github.com/miniupnp/miniupnp/pull/775
2024-10-06 23:22:28 +02:00
Thomas Bernard
19d527f60f miniupnpd/miniupnpd.c: remove last empty line :) 2024-10-05 01:06:10 +02:00
Thomas Bernard
9822338dd5 miniupnpd/configure: systemd only under linux 2024-10-05 01:05:48 +02:00
Ivan Shapovalov
9bbd11ed2c miniupnpd: configure: group libcap detection with other libraries 2024-10-05 00:57:25 +02:00
Ivan Shapovalov
cd2677a7c9
miniupnpd: configure: use $OS_FAMILY, not $FW to check for Linux 2024-10-05 00:55:04 +02:00
Thomas Bernard
e72ad0aeed miniupnpd/Makefile.linux* : move some common targets to common.mk 2024-10-05 00:40:36 +02:00
Ivan Shapovalov
9c79f2496f miniupnpd: Makefile, miniupnpd.service: rework and install units
Rework systemd units to make use of newly-added systemd integration,
reference correct iptables/nft scripts, not hardcode paths and generally
make use of the correct idioms.

Additionally, when `configure --systemd` is used, teach `make install`
to install the service file instead of the init script.
2024-10-05 00:31:32 +02:00
Ivan Shapovalov
9370a9cff0
miniupnpd: systemd integration
This adds `--systemd` build option and `-D` runtime flag to help running
miniupnd under the systemd service supervisor. Specifically, this makes
miniupnpd a foreground process (removes daemonization) and adds support
for sd_notify() API to signal readiness instead.

As a bonus, sd_notify() is used to send a "status line" to systemd for
better visibility into what's happening.
2024-10-05 00:26:45 +02:00
Ivan Shapovalov
68414e9526
miniupnpd: Makefile: rework install target 2024-10-05 00:06:07 +02:00
Thomas Bernard
176b00b085 miniupnpd/Makefile.linux clean: remove validateversion 2024-10-04 23:51:51 +02:00
Thomas Bernard
3f28d61d83
miniupnpd/gitrev.mk: use GitHub Actions variables
GITHUB_REF_TYPE / GITHUB_REF_NAME / GITHUB_SHA
2024-10-04 23:33:18 +02:00
Ivan Shapovalov
eb3cf72900 miniupnpd: configure, Makefile: make tests optional
Tests confuse compilation-database-driven code analysis tools
(specifically, some tests stub out certain functions and the stubs
sometimes get preferred over real definitions). So, make them optional.
2024-10-02 23:48:08 +02:00
Thomas Bernard
0ab27a2a32 miniupnpd/Makefile.linux*: do not remove config.h in clean target
It is consistent with Makefile.bsd.
And also more logical as config.h is generated by configure along
with the Makefile itself.

we could add a mrproper target to clean the config.h, config.mk, Makefile, etc.
2024-10-02 23:41:54 +02:00
Thomas Bernard
10901ba664 miniupnpd/Makefile.linux*: (c) 2024 2024-10-02 23:37:12 +02:00
Thomas Bernard
a21dc92f5e miniupnpd/Makefile.bsd: fix clean target
some object files were missing
2024-10-02 23:30:14 +02:00
Thomas Bernard
1b596c8d74 miniupnpd/Makefile.bsd: set OSNAME and ARCH in configure 2024-10-02 23:29:06 +02:00
Thomas Bernard
54b4086859
miniupnpd/Makefile.linux*: cleanup "clean:" target
there is no need to explicitely delete all theses files
which are included in OTHEROBJS
As OTHEROBJS is included in ALLOBJS, $(RM) $(ALLOBJS)
deletes the files
2024-10-02 23:17:24 +02:00
Ivan Shapovalov
49e6746b54 miniupnpd: Makefile: build ssdp tests in both iptables and nft Makefiles
I don't see a reason why they should not be built here; there is nothing
iptables-specific in them.
2024-10-02 23:07:08 +02:00
Ivan Shapovalov
8069d3d57d
miniupnpd: Makefile: remove pointless variable
In the Linux makefiles, test objects are specified directly for all
tests except this one. Remove the last variable for consistency.
2024-10-02 19:42:28 +02:00
Thomas Bernard
2be8af3551
miniupnpd/Makefile.bsd: use uuid tool set by configure 2024-10-02 19:37:11 +02:00
Ivan Shapovalov
95a6ffda1f miniupnpd: Makefile: move uuid tool detection to configure 2024-10-02 19:26:30 +02:00
Thomas Bernard
8e5e40a8ce
miniupnpd/Makefile.linux: drop hack to support clock_gettime() with glibc before 2.17 2024-10-02 16:51:19 +02:00
Thomas Bernard
e0ecb78717
fix CONFIG_OPTIONS so call of configure are made with the same options
bug introduced in commit ddf32884
2024-10-02 16:30:36 +02:00
Ivan Shapovalov
f8397b941a
miniupnpd: Makefile: remove traces of pkg-config from Makefiles
Remove Makefile variables for pkg-config path to ensure other usages do
not get re-added to Makefiles by accident.
2024-10-02 16:15:07 +02:00
Ivan Shapovalov
d1fb15e40e
miniupnpd: Makefile: move libssl detection to configure
fix: use "openssl" pkg-config instead of "libssl"
(libcrypto was missing)

Improvement : libssl is linked only when needed
(IGD2 and HTTPS both enabled)
2024-10-02 16:13:47 +02:00
Thomas Bernard
6ab64d765b miniupnpd/configure: add --https --https-cert and --https-key 2024-10-02 00:25:16 +02:00
Thomas Bernard
e0f26840dd
miniupnpd/configure: fix CONFIG_MK existence test
fix d68edd90cf64ff8d6de79072204d421889a95b5a
(my fault)
2024-10-01 01:21:35 +02:00
Thomas Bernard
1c1c052d82 miniupnpd/INSTALL: talk about the libuuid/uuid-dev 2024-09-30 20:06:10 +02:00
Ivan Shapovalov
cd01381bb3 miniupnpd: Makefile: move libuuid detection to configure 2024-09-30 19:58:57 +02:00
Ivan Shapovalov
e9d63f63ef
miniupnpd: Makefile: move libnftnl, libmnl detection to configure 2024-09-30 19:51:44 +02:00
Ivan Shapovalov
a1b4085de6
miniupnpd: Makefile: remove obsolete parts of libiptc detection
If for some inexplicable reason there is no pkg-config in the system,
we are able to detect libiptc 1.4.3+ in configure via testing for
xtables.h, so the Gentoo-specific hack seems obsolete.
2024-09-30 19:50:34 +02:00
Ivan Shapovalov
1ee9301092
miniupnpd: configure: cleanup libiptc detection 2024-09-30 19:49:20 +02:00
Thomas Bernard
3b78208545 miniupnpd/configure: pkg_detect() output a message for a library not found 2024-09-30 19:47:13 +02:00
Thomas Bernard
5b83bee077
miniupnpd/INSTALL: update instructions for linux
It may still be a bit outdated...
2024-09-30 19:45:23 +02:00
Ivan Shapovalov
c0c35bb86e
miniupnpd: configure: add a helper for pkg-config and config.mk
Instead of open-coding pkg-config usage, add a helper to use it
consistently, writing the results to config.mk.
2024-09-30 16:56:43 +02:00
Ivan Shapovalov
2f851743e0
miniupnpd: Makefile: generate dep-files during compilation
Implement the "Auto-Dependency Generation"[1] writeup by Paul D. Smith
and generate dep-files at the compilation time instead of requiring a
separate preprocessor pass. This removes the `depend` target as it is
not needed anymore.

[1]: https://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
2024-09-30 16:08:15 +02:00