From f53752043e6e503140cbde418d09dcd0ff1e8874 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 13 Sep 2024 01:36:35 +0300 Subject: =?UTF-8?q?net/miniupnpd:=20Update=202.3.6=20=E2=86=92=202.3.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog: - FreeBSD: use libpfctl (FreeBSD 15+ or --libpfctl) - default NOTIFY interval of 900s minus a random value - ipv6: prefer globally routable addresses http://miniupnp.free.fr/files/changelog.php?file=miniupnpd-2.3.7.tar.gz Port improvements: - use release tarball from upstream instead of USE_GITHUB; - replace spaces with tabs; - sort options in USES and in PLIST_FILES; - use PORTNAME variable in USE_RC_SUBR; - pet portclippy. PR: 281099 Approved by: squat@squat.no (maintainer, timeout > 14 days) --- net/miniupnpd/files/patch-pf_pfpinhole.c | 210 ------------------------------- 1 file changed, 210 deletions(-) delete mode 100644 net/miniupnpd/files/patch-pf_pfpinhole.c (limited to 'net/miniupnpd/files/patch-pf_pfpinhole.c') diff --git a/net/miniupnpd/files/patch-pf_pfpinhole.c b/net/miniupnpd/files/patch-pf_pfpinhole.c deleted file mode 100644 index 9c62bd94fdd4..000000000000 --- a/net/miniupnpd/files/patch-pf_pfpinhole.c +++ /dev/null @@ -1,210 +0,0 @@ ---- pf/pfpinhole.c.orig 2024-03-19 23:41:25 UTC -+++ pf/pfpinhole.c -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - - #include "config.h" - #include "pfpinhole.h" -@@ -171,6 +172,7 @@ int find_pinhole(const char * ifname, - unsigned int ts, tnum; - int i, n; - struct pfioc_rule pr; -+ struct pfctl_rule rule; - struct in6_addr saddr; - struct in6_addr daddr; - UNUSED(ifname); -@@ -191,7 +193,7 @@ int find_pinhole(const char * ifname, - pr.rule.action = PF_PASS; - #endif - if(ioctl(dev, DIOCGETRULES, &pr) < 0) { -- syslog(LOG_ERR, "ioctl(dev, DIOCGETRULES, ...): %m"); -+ syslog(LOG_ERR, "ioctl(dev, DIOCGETRULES, ...) (%s:%d): %m", __func__, __LINE__); - return -1; - } - n = pr.nr; -@@ -200,22 +202,22 @@ int find_pinhole(const char * ifname, - #endif /* PF_RELEASETICKETS */ - for(i=0; i= 0; i--) { - pr.nr = i; -- if(ioctl(dev, DIOCGETRULE, &pr) < 0) { -+ if (pfctl_get_rule(dev, i, pr.ticket, pr.anchor, PF_PASS, &rule, pr.anchor_call) < 0) { - syslog(LOG_ERR, "ioctl(dev, DIOCGETRULE): %m"); - release_ticket(dev, tnum); - return -1; - } -- if(sscanf(pr.rule.label, PINEHOLE_LABEL_FORMAT_SKIPDESC, &uid, &ts) != 2) { -- syslog(LOG_DEBUG, "rule with label '%s' is not a IGD pinhole", pr.rule.label); -+ if(sscanf(rule.label[0], PINEHOLE_LABEL_FORMAT_SKIPDESC, &uid, &ts) != 2) { -+ syslog(LOG_DEBUG, "rule with label '%s' is not a IGD pinhole", rule.label[0]); - continue; - } - if(ts <= (unsigned int)current_time) { -- syslog(LOG_INFO, "removing expired pinhole '%s'", pr.rule.label); -+ syslog(LOG_INFO, "removing expired pinhole '%s'", rule.label[0]); - pr.action = PF_CHANGE_GET_TICKET; - if(ioctl(dev, DIOCCHANGERULE, &pr) < 0) { - syslog(LOG_ERR, "ioctl(dev, DIOCCHANGERULE, ...) PF_CHANGE_GET_TICKET: %m"); -@@ -449,7 +454,7 @@ int clean_pinhole_list(unsigned int * next_timestamp) - #endif - release_ticket(dev, tnum); - if(ioctl(dev, DIOCGETRULES, &pr) < 0) { -- syslog(LOG_ERR, "ioctl(dev, DIOCGETRULES, ...): %m"); -+ syslog(LOG_ERR, "ioctl(dev, DIOCGETRULES, ...) (%s:%d): %m", __func__, __LINE__); - return -1; - } - #ifdef PF_RELEASETICKETS -- cgit v1.2.3