View | Details | Raw Unified | Return to bug 233963 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-3 / +9 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	miniupnpd
4
PORTNAME=	miniupnpd
5
PORTVERSION=	2.1.20190210
5
PORTVERSION=	2.1.20190210
6
PORTEPOCH=	1
6
PORTEPOCH=	2
7
CATEGORIES=	net
7
CATEGORIES=	net
8
MASTER_SITES=	http://miniupnp.tuxfamily.org/files/ \
8
MASTER_SITES=	http://miniupnp.tuxfamily.org/files/ \
9
		http://miniupnp.free.fr/files/
9
		http://miniupnp.free.fr/files/
Lines 25-31 Link Here
25
25
26
OPTIONS_DEFINE=	PF_FILTER_RULES CHECK_PORTINUSE IPV6 UPNP_IGDV2 UPNP_STRICT LEASEFILE
26
OPTIONS_DEFINE=	PF_FILTER_RULES CHECK_PORTINUSE IPV6 UPNP_IGDV2 UPNP_STRICT LEASEFILE
27
PF_FILTER_RULES_DESC=	Enable pf generation of filter rules
27
PF_FILTER_RULES_DESC=	Enable pf generation of filter rules
28
CHECK_PORTINUSE_DESC=	Check if ports are in use
28
#CHECK_PORTINUSE_DESC=	Check if ports are in use
29
UPNP_IGDV2_DESC=	Build an IGDv2 instead of an IGDv1
29
UPNP_IGDV2_DESC=	Build an IGDv2 instead of an IGDv1
30
UPNP_STRICT_DESC=	More strict UPnP specification compliance
30
UPNP_STRICT_DESC=	More strict UPnP specification compliance
31
LEASEFILE_DESC=	Enable lease file
31
LEASEFILE_DESC=	Enable lease file
Lines 37-44 Link Here
37
UPNP_STRICT_EXTRA_PATCHES=	${PATCHDIR}/enable_upnp_strict.patch
37
UPNP_STRICT_EXTRA_PATCHES=	${PATCHDIR}/enable_upnp_strict.patch
38
LEASEFILE_EXTRA_PATCHES=	${PATCHDIR}/enable_leasefile.patch
38
LEASEFILE_EXTRA_PATCHES=	${PATCHDIR}/enable_leasefile.patch
39
39
40
.include <bsd.port.options.mk>
41
42
.if ${OSVERSION} < 1200000
43
CHECK_PORTINUSE_EXTRA_PATCHES=	${PATCHDIR}/extra_patch-portinuse.c
44
.endif
45
40
post-patch:
46
post-patch:
41
	${REINPLACE_CMD} -e 's|\(-lssl -lcrypto\)|$$(LDFLAGS) \1|g' \
47
	${REINPLACE_CMD} -e 's|\(-lssl -lcrypto\)|$$(LDFLAGS) \1|g' \
42
	${WRKSRC}/Makefile
48
	${WRKSRC}/Makefile
43
	
49
44
.include <bsd.port.mk>
50
.include <bsd.port.mk>
(-)files/extra_patch-portinuse.c (+49 lines)
Line 0 Link Here
1
--- portinuse.c.orig	2017-11-02 17:38:02 UTC
2
+++ portinuse.c
3
@@ -280,7 +280,7 @@ static struct nlist list[] = {
4
 	struct xinpgen *xig, *exig;
5
 	struct xinpcb *xip;
6
 	struct xtcpcb *xtp;
7
-	struct inpcb *inp;
8
+	struct in_conninfo *inc;
9
 	void *buf = NULL;
10
 	size_t len;
11
 
12
@@ -339,7 +339,8 @@ static struct nlist list[] = {
13
 				free(buf);
14
 				return -1;
15
 			}
16
-			inp = &xtp->xt_inp;
17
+			xip = &xtp->xt_inp;
18
+			inc = &xip->inp_inc;
19
 			break;
20
 		case IPPROTO_UDP:
21
 			xip = (struct xinpcb *)xig;
22
@@ -349,21 +350,21 @@ static struct nlist list[] = {
23
 				free(buf);
24
 				return -1;
25
 			}
26
-			inp = &xip->xi_inp;
27
+			inc = &xip->inp_inc;
28
 			break;
29
 		default:
30
 			abort();
31
 		}
32
 		/* no support for IPv6 */
33
-		if ((inp->inp_vflag & INP_IPV6) != 0)
34
+		if ((xip->inp_vflag & INP_IPV6) != 0)
35
 			continue;
36
 		syslog(LOG_DEBUG, "%08lx:%hu %08lx:%hu <=> %hu %08lx:%hu",
37
-		       (u_long)inp->inp_laddr.s_addr, ntohs(inp->inp_lport),
38
-		       (u_long)inp->inp_faddr.s_addr, ntohs(inp->inp_fport),
39
+		       (u_long)inc->inc_laddr.s_addr, ntohs(inc->inc_lport),
40
+		       (u_long)inc->inc_faddr.s_addr, ntohs(inc->inc_fport),
41
 		       eport, (u_long)ip_addr.s_addr, iport
42
 		);
43
-		if (eport == (unsigned)ntohs(inp->inp_lport)) {
44
-			if (inp->inp_laddr.s_addr == INADDR_ANY || inp->inp_laddr.s_addr == ip_addr.s_addr) {
45
+		if (eport == (unsigned)ntohs(inc->inc_lport)) {
46
+			if (inc->inc_laddr.s_addr == INADDR_ANY || inc->inc_laddr.s_addr == ip_addr.s_addr) {
47
 				found++;
48
 				break;  /* don't care how many, just that we found at least one */
49
 			}
(-)files/patch-portinuse.c (-49 lines)
Lines 1-49 Link Here
1
--- portinuse.c.orig	2017-11-02 17:38:02 UTC
2
+++ portinuse.c
3
@@ -280,7 +280,7 @@ static struct nlist list[] = {
4
 	struct xinpgen *xig, *exig;
5
 	struct xinpcb *xip;
6
 	struct xtcpcb *xtp;
7
-	struct inpcb *inp;
8
+	struct in_conninfo *inc;
9
 	void *buf = NULL;
10
 	size_t len;
11
 
12
@@ -339,7 +339,8 @@ static struct nlist list[] = {
13
 				free(buf);
14
 				return -1;
15
 			}
16
-			inp = &xtp->xt_inp;
17
+			xip = &xtp->xt_inp;
18
+			inc = &xip->inp_inc;
19
 			break;
20
 		case IPPROTO_UDP:
21
 			xip = (struct xinpcb *)xig;
22
@@ -349,21 +350,21 @@ static struct nlist list[] = {
23
 				free(buf);
24
 				return -1;
25
 			}
26
-			inp = &xip->xi_inp;
27
+			inc = &xip->inp_inc;
28
 			break;
29
 		default:
30
 			abort();
31
 		}
32
 		/* no support for IPv6 */
33
-		if ((inp->inp_vflag & INP_IPV6) != 0)
34
+		if ((xip->inp_vflag & INP_IPV6) != 0)
35
 			continue;
36
 		syslog(LOG_DEBUG, "%08lx:%hu %08lx:%hu <=> %hu %08lx:%hu",
37
-		       (u_long)inp->inp_laddr.s_addr, ntohs(inp->inp_lport),
38
-		       (u_long)inp->inp_faddr.s_addr, ntohs(inp->inp_fport),
39
+		       (u_long)inc->inc_laddr.s_addr, ntohs(inc->inc_lport),
40
+		       (u_long)inc->inc_faddr.s_addr, ntohs(inc->inc_fport),
41
 		       eport, (u_long)ip_addr.s_addr, iport
42
 		);
43
-		if (eport == (unsigned)ntohs(inp->inp_lport)) {
44
-			if (inp->inp_laddr.s_addr == INADDR_ANY || inp->inp_laddr.s_addr == ip_addr.s_addr) {
45
+		if (eport == (unsigned)ntohs(inc->inc_lport)) {
46
+			if (inc->inc_laddr.s_addr == INADDR_ANY || inc->inc_laddr.s_addr == ip_addr.s_addr) {
47
 				found++;
48
 				break;  /* don't care how many, just that we found at least one */
49
 			}

Return to bug 233963