Index: Makefile =================================================================== --- Makefile (revision 501247) +++ Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= miniupnpd PORTVERSION= 2.1.20190210 -PORTEPOCH= 1 +PORTEPOCH= 2 CATEGORIES= net MASTER_SITES= http://miniupnp.tuxfamily.org/files/ \ http://miniupnp.free.fr/files/ @@ -25,7 +25,7 @@ OPTIONS_DEFINE= PF_FILTER_RULES CHECK_PORTINUSE IPV6 UPNP_IGDV2 UPNP_STRICT LEASEFILE PF_FILTER_RULES_DESC= Enable pf generation of filter rules -CHECK_PORTINUSE_DESC= Check if ports are in use +#CHECK_PORTINUSE_DESC= Check if ports are in use UPNP_IGDV2_DESC= Build an IGDv2 instead of an IGDv1 UPNP_STRICT_DESC= More strict UPnP specification compliance LEASEFILE_DESC= Enable lease file @@ -37,8 +37,14 @@ UPNP_STRICT_EXTRA_PATCHES= ${PATCHDIR}/enable_upnp_strict.patch LEASEFILE_EXTRA_PATCHES= ${PATCHDIR}/enable_leasefile.patch +.include + +.if ${OSVERSION} < 1200000 +CHECK_PORTINUSE_EXTRA_PATCHES= ${PATCHDIR}/extra_patch-portinuse.c +.endif + post-patch: ${REINPLACE_CMD} -e 's|\(-lssl -lcrypto\)|$$(LDFLAGS) \1|g' \ ${WRKSRC}/Makefile - + .include Index: files/extra_patch-portinuse.c =================================================================== --- files/extra_patch-portinuse.c (nonexistent) +++ files/extra_patch-portinuse.c (working copy) @@ -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 */ + } Property changes on: files/extra_patch-portinuse.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-portinuse.c =================================================================== --- files/patch-portinuse.c (revision 501247) +++ files/patch-portinuse.c (nonexistent) @@ -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 */ - } Property changes on: files/patch-portinuse.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property