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

Collapse All | Expand All

(-)b/net/miniupnpd/Makefile (+6 lines)
Lines 37-42 UPNP_IGDV2_EXTRA_PATCHES= ${PATCHDIR}/enable_igdv2.patch 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 ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200000
43
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
(-)b/net/miniupnpd/files/extra-patch-portinuse.c (+49 lines)
Added 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
 			}
(-)a/net/miniupnpd/files/patch-portinuse.c (-49 lines)
Removed 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