Commit graph

28 commits

Author SHA1 Message Date
Josef Schlehofer
b35c3984e1
Revert "net/miniupnpd: ext_ip_reserved_ignore support"
This patch is causing several issues [1], which then were reported to
upstream [2] and it was not accepted by upstream [3]. This results that
nobody maintain this custom patch and it is not useful as it is changing
addr_is_reserved behavior.

[1] https://github.com/openwrt/packages/issues/15258
[2] https://github.com/miniupnp/miniupnp/issues/542
[3] https://github.com/miniupnp/miniupnp/pull/511

This reverts commit b76aa99194.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 107f3376b5)
2021-08-28 09:05:30 +02:00
Jitao Lu
061f81ff6d miniupnpd: Don't override ipv6_listening_ip
Fixes: https://github.com/openwrt/packages/issues/14145
Signed-off-by: Jitao Lu <dianlujitao@gmail.com>
(cherry picked from commit c89a1f3e8b)
2020-12-08 23:22:46 -08:00
Jitao Lu
e82884cafb
miniupnpd: Pass ipv6 addr to ipv6_listening_ip
Unlike ipv4, this option is supposed to be an IP address, otherwise, an
error occurs on startup:

    can't parse "br-lan" as valid IPv6 listening address

Signed-off-by: Jitao Lu <dianlujitao@gmail.com>
(cherry picked from commit 7077fd8c79)
2020-12-03 17:58:39 -08:00
Chen Minqiang
808a67b35d
net/miniupnpd: ext_ip_reserved_ignore support
This add an option to ignore ext_ip reserved
Enable this option in config by default.

Fixes: #13773

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(cherry picked from commit b76aa99194)
2020-11-29 17:26:32 -08:00
Marco Martins
1adf9d9794
miniupnpd: Added chain rule to filter table so udp stun incoming connections rules works
Signed-off-by: Marco Martins <marcomartins86@gmail.com>
(cherry picked from commit 773b87977e)
2020-11-29 17:26:32 -08:00
Rosen Penev
4ed18c40e6
miniupnpd: update to 2.2.0
Replace daemon patch with upstream solution.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 4d824243e6)
2020-11-29 17:26:30 -08:00
Chen Minqiang
16cceb118a
net/miniupnpd: check by /etc/init.d/miniupnpd running
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(cherry picked from commit 67b4871322)
2020-11-29 17:25:38 -08:00
Rosen Penev
93d44081c3
miniupnpd: default to IGDv1
It seems even modern stuff doesn't support v2 correctly. The miniupnp
suite does but other stacks seem to lack support. Default to v1 to
avoid the headache.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 7891124d6c)
2020-11-29 17:25:06 -08:00
Alexey Kuznetsov
c614914da0
miniupnpd: add miniupnpd ipv6_disable option, #11971 close
Signed-off-by: Alexey Kuznetsov <axet@me.com>
(cherry picked from commit 9b6537b487)
2020-09-20 17:56:12 -07:00
Rosen Penev
cd080dded6
miniupnpd: added libcap dependency
As miniupnpd is running as root, libcap can be used to limit its
capabilities.

libcap is very small, so this isn't a problem.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit ba49c96808)
(switched to use libcap as -ng is not available)
2020-06-28 14:01:25 -07:00
Rosen Penev
b418029e41
miniupnpd: update to 2.1.20200510
Use the newly introduced configure script.

Use PKG_INSTALL for consistency between packages.

Use PKG_BUILD_PARALLEL for faster compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 2b5028458e)
2020-06-28 14:00:39 -07:00
David Ehrmann
231e47185e
miniupnpd: suppress grep and uci errors
If miniupnpd is installed but disabled or not running, the hotplug
script will query uci for keys that don't exist and grep a temporary
config file that doesn't exist, resulting in the following errors:

uci: Entry not found
grep: /var/etc/miniupnd.conf: No such file or directory

These would arise when an interface is brought up or down, and are
more confusing than helpful, especially when miniupnpd is disabled.

Suppress these errors.

Signed-off-by: David Ehrmann <ehrmann@gmail.com>
(cherry picked from commit 6ef2b5400b)
2020-06-28 14:00:39 -07:00
Kevin Darbyshire-Bryant
5cb388497e
miniupnpd: improve hotplug & interface handling
The existing interface selection/detection code was incomprehensible at
worst and convoluted at best.  The uci config file suggested it
understood an external ipv6 interface but in reality the init script
took no notice.  Re-work it so it is at least comprehendible and takes
notice of ipv6 interface details if specified.

Update the hotplug script to use the same interface selection/detection
code as the init script and take note of ipv6 interface selection, only
restarting miniupnpd on interface up events and only if that interface
isn't already known (for that ip class) by miniupnpd.

For me this has solved numerous 'flaky' startup problems, especially
with regard to ipv6.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 295d77943c)
2020-06-28 14:00:24 -07:00
Kevin Darbyshire-Bryant
2e01dd8382
miniupnpd: make hotplug work again
hotplug scripts are sourced not exec'd so #!/bin/sh /etc/rc.common
doesn't pull in the functions defined in /etc/rc.common thus since
'enabled' isn't defined the following sequence always fails:

enabled miniupnpd || exit 0

Unfortunately sourcing /etc/rc.common doesn't appear to work so come up
with some alternatives.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2020-05-10 14:57:29 -07:00
Kevin Darbyshire-Bryant
83ff6c38f2
miniupnpd: fix sh syntax error
Add "use_stun" default to prevent sh: out of range error introduced by
c61614a84

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 0f1e7d32af)
2020-04-17 15:21:56 -07:00
Rosen Penev
1fe1c80d66
miniupnpd: convert to procd
Massive cleanup of the shell script. Many issues were fixed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit c61614a849)
2020-04-17 15:21:35 -07:00
DENG Qingfang
c02c42849e
miniupnpd: update to 2.1.20191006
Removed upstreamed patch:
100-build-on-OpenWrt.patch

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
(cherry picked from commit fcf72ceec4)
2020-04-17 15:21:25 -07:00
Jan Pavlinec
937b19ebb7
treewide: add PKG_CPE_ID for better cvescanner coverage
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
(cherry-picked from bf2f1a0263)
2019-09-26 19:36:27 -07:00
Rosen Penev
ee4a1c0c09
miniupnpd: Fix compilation under glibc
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-04-27 12:01:45 -07:00
Rosen Penev
96f50729ad
miniupnpd: Update to 2.1.20190408
Refreshed patch.

Added PKG_LICENSE_FILES.

Added --as-needed linker flag for slightly smaller size.

Removed -O2 hack to get it to compile. As part of this, removed a bunch of
CFLAGS that are normally passed which potentially affect compilation with
Os.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-04-13 17:04:23 -07:00
Rosen Penev
8dc7472705 miniupnpd: Update to 2.1.20180706
Switched to upstream mirror 2, which is reachable over HTTPS.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2018-08-04 11:55:33 -07:00
Kevin Darbyshire-Bryant
d5aaba2702 miniupnpd: remove my maintainership
Practicalities of life have intervened and I am no longer able to
dedicate the time required to look after this package.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-08-02 22:30:31 +01:00
Kevin Darbyshire-Bryant
48d9c84a99 miniupnpd: fix build error when ASLR enabled
Add -fPIC to TARGET_LD_FLAGS

ce9TpAS.ltrans0.ltrans.o: relocation R_MIPS16_26 against `syslog' can not
be used when making a shared object; recompile with -fPIC
cce9TpAS.ltrans0.ltrans.o: error adding symbols: Bad value

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-06-08 15:25:09 +01:00
Kevin Darbyshire-Bryant
762e8b0f17 miniupnpd: bump to v2.1 20180508
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-05-13 19:01:44 +01:00
Kevin Darbyshire-Bryant
569ed29e63 miniupnpd: change leasefile location
Move default leasefile location from /var to /var/run.
Also rename from upnp.leases to miniupnpd.leases

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-05-09 20:02:29 +01:00
Kevin Darbyshire-Bryant
2777953325 miniupnpd: build with gc-sections & LTO
Building with --gc-sections & -flto drop ipk size from 72600 to 66345
on MIPS

No misbehaviour due to these optimisations observed.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-05-09 20:02:17 +01:00
Kevin Darbyshire-Bryant
079e57bbd1 miniupnpd: bump to 2.0.20180503
Bumping to latest release.  No (used) functional difference.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-05-08 14:32:55 +01:00
Kevin Darbyshire-Bryant
a2e2eeb409 miniupnpd: Import release 20180422 to repo
Import miniupnpd from routing repo and bump to 20180422.

Drop 102-ipv6-ext-port.patch as this looks upstreamed in the pinhole
code to me.
Consolidate all other patches & update with a view to sending upstream.

Add support for runtime IGDv1 mode switch (default to IGDv2)

(not extensively) Tested-on: ar71xx Archer C7 v2 in IGDv1 compatibility
mode.  A variety of devices/applications appear to be able to create
mappings.

Have an attempt at resolving https://github.com/openwrt-routing/packages/issues/286
TL;DR miniupnpd rules get processed before fw3 rules and thus can
override existing/intended redirects.  Ideally the miniupnpd rules would
be last in the relevant chains, unfortunately fw3 can sometimes use the
last rule as a REJECT.  Put miniupnpd rules as penultimate.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-05-04 09:03:56 +01:00