FreeBSD Bugzilla – Attachment 209047 Details for
Bug 233963
net/miniupnpd: Fails to build when CHECK_PORTINUSE option enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch v4
miniupnpd-portinuse.diff (text/plain), 4.15 KB, created by
Franco Fichtner
on 2019-11-11 08:04:33 UTC
(
hide
)
Description:
patch v4
Filename:
MIME Type:
Creator:
Franco Fichtner
Created:
2019-11-11 08:04:33 UTC
Size:
4.15 KB
patch
obsolete
>diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile >index 3d0d876a38..dc80c75808 100644 >--- a/net/miniupnpd/Makefile >+++ b/net/miniupnpd/Makefile >@@ -37,6 +37,12 @@ UPNP_IGDV2_EXTRA_PATCHES= ${PATCHDIR}/enable_igdv2.patch > UPNP_STRICT_EXTRA_PATCHES= ${PATCHDIR}/enable_upnp_strict.patch > LEASEFILE_EXTRA_PATCHES= ${PATCHDIR}/enable_leasefile.patch > >+.include <bsd.port.options.mk> >+ >+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200000 >+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-portinuse.c >+.endif >+ > post-patch: > ${REINPLACE_CMD} -e 's|\(-lssl -lcrypto\)|$$(LDFLAGS) \1|g' \ > ${WRKSRC}/Makefile >diff --git a/net/miniupnpd/files/extra-patch-portinuse.c b/net/miniupnpd/files/extra-patch-portinuse.c >new file mode 100644 >index 0000000000..8ec4e68022 >--- /dev/null >+++ b/net/miniupnpd/files/extra-patch-portinuse.c >@@ -0,0 +1,49 @@ >+--- portinuse.c.orig 2017-11-02 17:38:02 UTC >++++ portinuse.c >+@@ -280,7 +280,7 @@ static struct nlist list[] = { >+ struct xinpgen *xig, *exig; >+ struct xinpcb *xip; >+ struct xtcpcb *xtp; >+- struct inpcb *inp; >++ struct in_conninfo *inc; >+ void *buf = NULL; >+ size_t len; >+ >+@@ -339,7 +339,8 @@ static struct nlist list[] = { >+ free(buf); >+ return -1; >+ } >+- inp = &xtp->xt_inp; >++ xip = &xtp->xt_inp; >++ inc = &xip->inp_inc; >+ break; >+ case IPPROTO_UDP: >+ xip = (struct xinpcb *)xig; >+@@ -349,21 +350,21 @@ static struct nlist list[] = { >+ free(buf); >+ return -1; >+ } >+- inp = &xip->xi_inp; >++ inc = &xip->inp_inc; >+ break; >+ default: >+ abort(); >+ } >+ /* no support for IPv6 */ >+- if ((inp->inp_vflag & INP_IPV6) != 0) >++ if ((xip->inp_vflag & INP_IPV6) != 0) >+ continue; >+ syslog(LOG_DEBUG, "%08lx:%hu %08lx:%hu <=> %hu %08lx:%hu", >+- (u_long)inp->inp_laddr.s_addr, ntohs(inp->inp_lport), >+- (u_long)inp->inp_faddr.s_addr, ntohs(inp->inp_fport), >++ (u_long)inc->inc_laddr.s_addr, ntohs(inc->inc_lport), >++ (u_long)inc->inc_faddr.s_addr, ntohs(inc->inc_fport), >+ eport, (u_long)ip_addr.s_addr, iport >+ ); >+- if (eport == (unsigned)ntohs(inp->inp_lport)) { >+- if (inp->inp_laddr.s_addr == INADDR_ANY || inp->inp_laddr.s_addr == ip_addr.s_addr) { >++ if (eport == (unsigned)ntohs(inc->inc_lport)) { >++ if (inc->inc_laddr.s_addr == INADDR_ANY || inc->inc_laddr.s_addr == ip_addr.s_addr) { >+ found++; >+ break; /* don't care how many, just that we found at least one */ >+ } >diff --git a/net/miniupnpd/files/patch-portinuse.c b/net/miniupnpd/files/patch-portinuse.c >deleted file mode 100644 >index 8ec4e68022..0000000000 >--- a/net/miniupnpd/files/patch-portinuse.c >+++ /dev/null >@@ -1,49 +0,0 @@ >---- portinuse.c.orig 2017-11-02 17:38:02 UTC >-+++ portinuse.c >-@@ -280,7 +280,7 @@ static struct nlist list[] = { >- struct xinpgen *xig, *exig; >- struct xinpcb *xip; >- struct xtcpcb *xtp; >-- struct inpcb *inp; >-+ struct in_conninfo *inc; >- void *buf = NULL; >- size_t len; >- >-@@ -339,7 +339,8 @@ static struct nlist list[] = { >- free(buf); >- return -1; >- } >-- inp = &xtp->xt_inp; >-+ xip = &xtp->xt_inp; >-+ inc = &xip->inp_inc; >- break; >- case IPPROTO_UDP: >- xip = (struct xinpcb *)xig; >-@@ -349,21 +350,21 @@ static struct nlist list[] = { >- free(buf); >- return -1; >- } >-- inp = &xip->xi_inp; >-+ inc = &xip->inp_inc; >- break; >- default: >- abort(); >- } >- /* no support for IPv6 */ >-- if ((inp->inp_vflag & INP_IPV6) != 0) >-+ if ((xip->inp_vflag & INP_IPV6) != 0) >- continue; >- syslog(LOG_DEBUG, "%08lx:%hu %08lx:%hu <=> %hu %08lx:%hu", >-- (u_long)inp->inp_laddr.s_addr, ntohs(inp->inp_lport), >-- (u_long)inp->inp_faddr.s_addr, ntohs(inp->inp_fport), >-+ (u_long)inc->inc_laddr.s_addr, ntohs(inc->inc_lport), >-+ (u_long)inc->inc_faddr.s_addr, ntohs(inc->inc_fport), >- eport, (u_long)ip_addr.s_addr, iport >- ); >-- if (eport == (unsigned)ntohs(inp->inp_lport)) { >-- if (inp->inp_laddr.s_addr == INADDR_ANY || inp->inp_laddr.s_addr == ip_addr.s_addr) { >-+ if (eport == (unsigned)ntohs(inc->inc_lport)) { >-+ if (inc->inc_laddr.s_addr == INADDR_ANY || inc->inc_laddr.s_addr == ip_addr.s_addr) { >- found++; >- break; /* don't care how many, just that we found at least one */ >- }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233963
:
200061
|
204319
|
204320
|
204321
| 209047