miniupnpd-2.1

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

miniupnpd-2.1

Björn Ketelaars
Diff below brings miniupnpd to the latest version (2.1). Changelog can
be found at
http://miniupnp.free.fr/files/changelog.php?file=miniupnpd-2.1.tar.gz

(Lightly) tested at home by a PS4-fanatic.

OK?


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile 4 Sep 2018 12:46:17 -0000 1.17
+++ Makefile 7 Mar 2019 05:53:57 -0000
@@ -2,8 +2,7 @@
 
 COMMENT= UPnP IGD daemon
 
-DISTNAME= miniupnpd-1.9
-REVISION= 4
+DISTNAME= miniupnpd-2.1
 
 WANTLIB += c crypto kvm ssl
 
@@ -11,6 +10,9 @@ MAKE_FLAGS= INSTALLETCDIR=${PREFIX}/shar
  INSTALLMANDIR=${PREFIX}/man/man8
 
 FAKE_FLAGS= PREFIX=${TRUEPREFIX}
+
+CONFIGURE_STYLE= simple
+CONFIGURE_SCRIPT= genconfig.sh
 
 post-install:
  ${INSTALL_MAN_DIR} ${PREFIX}/man/man8
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo 17 Jun 2015 09:51:48 -0000 1.5
+++ distinfo 7 Mar 2019 05:53:57 -0000
@@ -1,2 +1,2 @@
-SHA256 (miniupnpd-1.9.tar.gz) = YXbrIaZCKn7mjvHGLMu9UAMzX6dz2MkBMijCohe7oqw=
-SIZE (miniupnpd-1.9.tar.gz) = 192183
+SHA256 (miniupnpd-2.1.tar.gz) = lQiUd5ZhGX/gk4Vf2imnKPQ0tXVutPpstfe5v/f/4ME=
+SIZE (miniupnpd-2.1.tar.gz) = 225458
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 patch-Makefile
--- patches/patch-Makefile 17 Jun 2015 09:51:48 -0000 1.5
+++ patches/patch-Makefile 7 Mar 2019 05:53:57 -0000
@@ -1,9 +1,10 @@
 $OpenBSD: patch-Makefile,v 1.5 2015/06/17 09:51:48 ajacoutot Exp $
---- Makefile.orig Mon Jun 30 14:03:05 2014
-+++ Makefile Wed Jun 17 11:06:29 2015
-@@ -173,7 +173,7 @@ clean:
- testportinuse.o \
+Index: Makefile
+--- Makefile.orig
++++ Makefile
+@@ -176,7 +176,7 @@ clean:
  $(PFOBJS) $(IPFOBJS) $(IPFWOBJS)
+ $(RM) validateupnppermissions validategetifaddr validatessdppktgen
 
 -install: miniupnpd genuuid
 +install: miniupnpd
Index: patches/patch-minissdp_c
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-minissdp_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-minissdp_c
--- patches/patch-minissdp_c 10 Sep 2016 13:03:42 -0000 1.1
+++ patches/patch-minissdp_c 7 Mar 2019 05:53:57 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-minissdp_c,v 1.1 2016/09/10 13:03:42 ajacoutot Exp $
---- minissdp.c.orig Sat Sep 10 12:02:27 2016
-+++ minissdp.c Sat Sep 10 12:02:37 2016
-@@ -10,6 +10,7 @@
+Index: minissdp.c
+--- minissdp.c.orig
++++ minissdp.c
+@@ -11,6 +11,7 @@
  #include <string.h>
  #include <unistd.h>
  #include <sys/socket.h>
Index: patches/patch-miniupnpd_8
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-miniupnpd_8,v
retrieving revision 1.1
diff -u -p -r1.1 patch-miniupnpd_8
--- patches/patch-miniupnpd_8 17 May 2013 10:59:31 -0000 1.1
+++ patches/patch-miniupnpd_8 7 Mar 2019 05:53:57 -0000
@@ -1,12 +1,13 @@
 $OpenBSD: patch-miniupnpd_8,v 1.1 2013/05/17 10:59:31 dcoppa Exp $
---- miniupnpd.8.orig Thu May 13 11:18:12 2010
-+++ miniupnpd.8 Thu May 13 11:18:31 2010
+Index: miniupnpd.8
+--- miniupnpd.8.orig
++++ miniupnpd.8
 @@ -17,7 +17,7 @@ clients on the LAN to ask for port redirections.
  .SH OPTIONS
  .TP
- .B \-f file
+ .BI \-f " config_file"
 -load the config from file. default is /etc/miniupnpd.conf.
 +load the config from file. default is ${SYSCONFDIR}/miniupnpd.conf.
  .TP
- .B \-i interface
+ .BI \-i " ext_ifname"
  interface used to connect to the internet.
Index: patches/patch-miniupnpd_conf
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-miniupnpd_conf,v
retrieving revision 1.4
diff -u -p -r1.4 patch-miniupnpd_conf
--- patches/patch-miniupnpd_conf 17 Jun 2015 09:51:48 -0000 1.4
+++ patches/patch-miniupnpd_conf 7 Mar 2019 05:53:57 -0000
@@ -1,16 +1,17 @@
 $OpenBSD: patch-miniupnpd_conf,v 1.4 2015/06/17 09:51:48 ajacoutot Exp $
---- miniupnpd.conf.orig Tue Oct 21 16:15:14 2014
-+++ miniupnpd.conf Wed Jun 17 11:51:03 2015
+Index: miniupnpd.conf
+--- miniupnpd.conf.orig
++++ miniupnpd.conf
 @@ -121,7 +121,7 @@ clean_ruleset_interval=600
  # active when compiled with PF_ENABLE_FILTER_RULES (see config.h file)
  #quickrules=no
 
--# uuid : generate your own with "make genuuid"
+-# UUID, generate your own UUID with "make genuuid"
 +# uuid : generate your own with uuid(1) or uuidgen(1)
  uuid=00000000-0000-0000-0000-000000000000
 
- # serial and model number the daemon will report to clients
-@@ -141,9 +141,9 @@ uuid=00000000-0000-0000-0000-000000000000
+ # Daemon's serial and model number when reporting to clients
+@@ -145,8 +145,8 @@ uuid=00000000-0000-0000-0000-000000000000
  # modify the IP ranges to match their own internal networks, and
  # also consider implementing network-specific restrictions
  # CAUTION: failure to enforce any rules may permit insecure requests to be made!
@@ -23,4 +24,3 @@ $OpenBSD: patch-miniupnpd_conf,v 1.4 201
 +#allow 1024-65535 192.168.0.0/23 22
 +#allow 12345 192.168.7.113/32 54321
  deny 0-65535 0.0.0.0/0 0-65535
-
Index: patches/patch-portinuse_c
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-portinuse_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-portinuse_c
--- patches/patch-portinuse_c 10 Sep 2016 13:03:42 -0000 1.1
+++ patches/patch-portinuse_c 7 Mar 2019 05:53:57 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-portinuse_c,v 1.1 2016/09/10 13:03:42 ajacoutot Exp $
---- portinuse.c.orig Sat Sep 10 12:03:59 2016
-+++ portinuse.c Sat Sep 10 12:04:12 2016
-@@ -17,6 +17,7 @@
+Index: portinuse.c
+--- portinuse.c.orig
++++ portinuse.c
+@@ -18,6 +18,7 @@
  #include <errno.h>
  #include <time.h>
  #include <sys/types.h>
Index: patches/patch-testasyncsendto_c
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-testasyncsendto_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-testasyncsendto_c
--- patches/patch-testasyncsendto_c 17 Jun 2015 09:51:48 -0000 1.1
+++ patches/patch-testasyncsendto_c 7 Mar 2019 05:53:57 -0000
@@ -2,23 +2,24 @@ $OpenBSD: patch-testasyncsendto_c,v 1.1
 
 warning: format '%ld' expects type 'long int', but argument 4 has type 'time_t'
 
---- testasyncsendto.c.orig Wed Jun 17 11:12:06 2015
-+++ testasyncsendto.c Wed Jun 17 11:12:44 2015
-@@ -71,7 +71,7 @@ int test(void)
+Index: testasyncsendto.c
+--- testasyncsendto.c.orig
++++ testasyncsendto.c
+@@ -74,7 +74,7 @@ int test(void)
  int max_fd;
  struct timeval timeout;
  struct timeval now;
 - syslog(LOG_DEBUG, "get_next_scheduled_send : %d next_send=%ld.%06ld",
-+ syslog(LOG_DEBUG, "get_next_scheduled_send : %d next_send=%lld.%06ld",
-       i, next_send.tv_sec, next_send.tv_usec);
++ syslog(LOG_DEBUG, "get_next_scheduled_send : %d next_send==%lld.%06ld",
+       i, (long)next_send.tv_sec, (long)next_send.tv_usec);
  FD_ZERO(&writefds);
  max_fd = 0;
-@@ -97,7 +97,7 @@ int test(void)
+@@ -100,7 +100,7 @@ int test(void)
  }
  }
  syslog(LOG_DEBUG, "get_sendto_fds() returned %d", i);
 - syslog(LOG_DEBUG, "select(%d, NULL, xx, NULL, %ld.%06ld)",
 + syslog(LOG_DEBUG, "select(%d, NULL, xx, NULL, %lld.%06ld)",
-       max_fd, timeout.tv_sec, timeout.tv_usec);
+       max_fd, (long)timeout.tv_sec, (long)timeout.tv_usec);
  i = select(max_fd, NULL, &writefds, NULL, &timeout);
  if(i < 0) {
Index: patches/patch-upnpevents_c
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-upnpevents_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-upnpevents_c
--- patches/patch-upnpevents_c 10 Sep 2016 13:03:42 -0000 1.1
+++ patches/patch-upnpevents_c 7 Mar 2019 05:53:57 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-upnpevents_c,v 1.1 2016/09/10 13:03:42 ajacoutot Exp $
---- upnpevents.c.orig Sat Sep 10 12:01:20 2016
-+++ upnpevents.c Sat Sep 10 12:01:32 2016
-@@ -13,6 +13,7 @@
+Index: upnpevents.c
+--- upnpevents.c.orig
++++ upnpevents.c
+@@ -14,6 +14,7 @@
  #include <unistd.h>
  #include <time.h>
  #include <sys/types.h>
Index: patches/patch-upnpredirect_c
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-upnpredirect_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-upnpredirect_c
--- patches/patch-upnpredirect_c 10 Sep 2016 13:03:42 -0000 1.1
+++ patches/patch-upnpredirect_c 7 Mar 2019 05:53:57 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-upnpredirect_c,v 1.1 2016/09/10 13:03:42 ajacoutot Exp $
---- upnpredirect.c.orig Sat Sep 10 12:02:08 2016
-+++ upnpredirect.c Sat Sep 10 12:02:15 2016
-@@ -9,6 +9,7 @@
+Index: upnpredirect.c
+--- upnpredirect.c.orig
++++ upnpredirect.c
+@@ -10,6 +10,7 @@
  #include <string.h>
  #include <syslog.h>
  #include <sys/types.h>
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST 4 Sep 2018 12:46:17 -0000 1.3
+++ pkg/PLIST 7 Mar 2019 05:53:57 -0000
@@ -1,8 +1,8 @@
 @comment $OpenBSD: PLIST,v 1.3 2018/09/04 12:46:17 espie Exp $
+@rcscript ${RCDIR}/miniupnpd
 @man man/man8/miniupnpd.8
 @bin sbin/miniupnpd
 share/doc/pkg-readmes/${PKGSTEM}
 share/examples/miniupnpd/
 share/examples/miniupnpd/miniupnpd.conf
 @sample ${SYSCONFDIR}/miniupnpd.conf
-@rcscript ${RCDIR}/miniupnpd

Reply | Threaded
Open this post in threaded view
|

Re: miniupnpd-2.1

Stuart Henderson
On 2019/03/07 07:09, Björn Ketelaars wrote:
> Diff below brings miniupnpd to the latest version (2.1). Changelog can
> be found at
> http://miniupnp.free.fr/files/changelog.php?file=miniupnpd-2.1.tar.gz
>
> (Lightly) tested at home by a PS4-fanatic.
>
> OK?
>

Most parts read okay but there's a problem here

> Index: patches/patch-testasyncsendto_c
> ===================================================================
> RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-testasyncsendto_c,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-testasyncsendto_c
> --- patches/patch-testasyncsendto_c 17 Jun 2015 09:51:48 -0000 1.1
> +++ patches/patch-testasyncsendto_c 7 Mar 2019 05:53:57 -0000
> @@ -2,23 +2,24 @@ $OpenBSD: patch-testasyncsendto_c,v 1.1
>  
>  warning: format '%ld' expects type 'long int', but argument 4 has type 'time_t'
>  
> ---- testasyncsendto.c.orig Wed Jun 17 11:12:06 2015
> -+++ testasyncsendto.c Wed Jun 17 11:12:44 2015
> -@@ -71,7 +71,7 @@ int test(void)
> +Index: testasyncsendto.c
> +--- testasyncsendto.c.orig
> ++++ testasyncsendto.c
> +@@ -74,7 +74,7 @@ int test(void)
>   int max_fd;
>   struct timeval timeout;
>   struct timeval now;
>  - syslog(LOG_DEBUG, "get_next_scheduled_send : %d next_send=%ld.%06ld",
> -+ syslog(LOG_DEBUG, "get_next_scheduled_send : %d next_send=%lld.%06ld",
> -       i, next_send.tv_sec, next_send.tv_usec);
> ++ syslog(LOG_DEBUG, "get_next_scheduled_send : %d next_send==%lld.%06ld",
> +       i, (long)next_send.tv_sec, (long)next_send.tv_usec);
>   FD_ZERO(&writefds);
>   max_fd = 0;
> -@@ -97,7 +97,7 @@ int test(void)
> +@@ -100,7 +100,7 @@ int test(void)
>   }
>   }
>   syslog(LOG_DEBUG, "get_sendto_fds() returned %d", i);
>  - syslog(LOG_DEBUG, "select(%d, NULL, xx, NULL, %ld.%06ld)",
>  + syslog(LOG_DEBUG, "select(%d, NULL, xx, NULL, %lld.%06ld)",
> -       max_fd, timeout.tv_sec, timeout.tv_usec);
> +       max_fd, (long)timeout.tv_sec, (long)timeout.tv_usec);
>   i = select(max_fd, NULL, &writefds, NULL, &timeout);
>   if(i < 0) {

Upstream fixed the format strings/variable mismatch and the updated patch
is bringing back the problem in the other direction.

Either remove the whole patch (good until time_t wrap...at least it's
the test rather than the main code), or keep the format string patches
and change the cast from long to long long.

Reply | Threaded
Open this post in threaded view
|

Re: miniupnpd-2.1

Björn Ketelaars
On Fri 08/03/2019 02:55, Stuart Henderson wrote:

> On 2019/03/07 07:09, Björn Ketelaars wrote:
> > Diff below brings miniupnpd to the latest version (2.1). Changelog can
> > be found at
> > http://miniupnp.free.fr/files/changelog.php?file=miniupnpd-2.1.tar.gz
> >
> > (Lightly) tested at home by a PS4-fanatic.
> >
> > OK?
> >
> Either remove the whole patch (good until time_t wrap...at least it's
> the test rather than the main code), or keep the format string patches
> and change the cast from long to long long.

I thought I had the latter in my working tree. Guess I made a mistake in
my workflow. Thanks for noticing! New diff attached, only change is the
long long cast.

OK?


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile 4 Sep 2018 12:46:17 -0000 1.17
+++ Makefile 8 Mar 2019 06:08:08 -0000
@@ -2,8 +2,7 @@
 
 COMMENT= UPnP IGD daemon
 
-DISTNAME= miniupnpd-1.9
-REVISION= 4
+DISTNAME= miniupnpd-2.1
 
 WANTLIB += c crypto kvm ssl
 
@@ -11,6 +10,9 @@ MAKE_FLAGS= INSTALLETCDIR=${PREFIX}/shar
  INSTALLMANDIR=${PREFIX}/man/man8
 
 FAKE_FLAGS= PREFIX=${TRUEPREFIX}
+
+CONFIGURE_STYLE= simple
+CONFIGURE_SCRIPT= genconfig.sh
 
 post-install:
  ${INSTALL_MAN_DIR} ${PREFIX}/man/man8
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo 17 Jun 2015 09:51:48 -0000 1.5
+++ distinfo 8 Mar 2019 06:08:08 -0000
@@ -1,2 +1,2 @@
-SHA256 (miniupnpd-1.9.tar.gz) = YXbrIaZCKn7mjvHGLMu9UAMzX6dz2MkBMijCohe7oqw=
-SIZE (miniupnpd-1.9.tar.gz) = 192183
+SHA256 (miniupnpd-2.1.tar.gz) = lQiUd5ZhGX/gk4Vf2imnKPQ0tXVutPpstfe5v/f/4ME=
+SIZE (miniupnpd-2.1.tar.gz) = 225458
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 patch-Makefile
--- patches/patch-Makefile 17 Jun 2015 09:51:48 -0000 1.5
+++ patches/patch-Makefile 8 Mar 2019 06:08:08 -0000
@@ -1,9 +1,10 @@
 $OpenBSD: patch-Makefile,v 1.5 2015/06/17 09:51:48 ajacoutot Exp $
---- Makefile.orig Mon Jun 30 14:03:05 2014
-+++ Makefile Wed Jun 17 11:06:29 2015
-@@ -173,7 +173,7 @@ clean:
- testportinuse.o \
+Index: Makefile
+--- Makefile.orig
++++ Makefile
+@@ -176,7 +176,7 @@ clean:
  $(PFOBJS) $(IPFOBJS) $(IPFWOBJS)
+ $(RM) validateupnppermissions validategetifaddr validatessdppktgen
 
 -install: miniupnpd genuuid
 +install: miniupnpd
Index: patches/patch-minissdp_c
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-minissdp_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-minissdp_c
--- patches/patch-minissdp_c 10 Sep 2016 13:03:42 -0000 1.1
+++ patches/patch-minissdp_c 8 Mar 2019 06:08:08 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-minissdp_c,v 1.1 2016/09/10 13:03:42 ajacoutot Exp $
---- minissdp.c.orig Sat Sep 10 12:02:27 2016
-+++ minissdp.c Sat Sep 10 12:02:37 2016
-@@ -10,6 +10,7 @@
+Index: minissdp.c
+--- minissdp.c.orig
++++ minissdp.c
+@@ -11,6 +11,7 @@
  #include <string.h>
  #include <unistd.h>
  #include <sys/socket.h>
Index: patches/patch-miniupnpd_8
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-miniupnpd_8,v
retrieving revision 1.1
diff -u -p -r1.1 patch-miniupnpd_8
--- patches/patch-miniupnpd_8 17 May 2013 10:59:31 -0000 1.1
+++ patches/patch-miniupnpd_8 8 Mar 2019 06:08:08 -0000
@@ -1,12 +1,13 @@
 $OpenBSD: patch-miniupnpd_8,v 1.1 2013/05/17 10:59:31 dcoppa Exp $
---- miniupnpd.8.orig Thu May 13 11:18:12 2010
-+++ miniupnpd.8 Thu May 13 11:18:31 2010
+Index: miniupnpd.8
+--- miniupnpd.8.orig
++++ miniupnpd.8
 @@ -17,7 +17,7 @@ clients on the LAN to ask for port redirections.
  .SH OPTIONS
  .TP
- .B \-f file
+ .BI \-f " config_file"
 -load the config from file. default is /etc/miniupnpd.conf.
 +load the config from file. default is ${SYSCONFDIR}/miniupnpd.conf.
  .TP
- .B \-i interface
+ .BI \-i " ext_ifname"
  interface used to connect to the internet.
Index: patches/patch-miniupnpd_conf
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-miniupnpd_conf,v
retrieving revision 1.4
diff -u -p -r1.4 patch-miniupnpd_conf
--- patches/patch-miniupnpd_conf 17 Jun 2015 09:51:48 -0000 1.4
+++ patches/patch-miniupnpd_conf 8 Mar 2019 06:08:08 -0000
@@ -1,16 +1,17 @@
 $OpenBSD: patch-miniupnpd_conf,v 1.4 2015/06/17 09:51:48 ajacoutot Exp $
---- miniupnpd.conf.orig Tue Oct 21 16:15:14 2014
-+++ miniupnpd.conf Wed Jun 17 11:51:03 2015
+Index: miniupnpd.conf
+--- miniupnpd.conf.orig
++++ miniupnpd.conf
 @@ -121,7 +121,7 @@ clean_ruleset_interval=600
  # active when compiled with PF_ENABLE_FILTER_RULES (see config.h file)
  #quickrules=no
 
--# uuid : generate your own with "make genuuid"
+-# UUID, generate your own UUID with "make genuuid"
 +# uuid : generate your own with uuid(1) or uuidgen(1)
  uuid=00000000-0000-0000-0000-000000000000
 
- # serial and model number the daemon will report to clients
-@@ -141,9 +141,9 @@ uuid=00000000-0000-0000-0000-000000000000
+ # Daemon's serial and model number when reporting to clients
+@@ -145,8 +145,8 @@ uuid=00000000-0000-0000-0000-000000000000
  # modify the IP ranges to match their own internal networks, and
  # also consider implementing network-specific restrictions
  # CAUTION: failure to enforce any rules may permit insecure requests to be made!
@@ -23,4 +24,3 @@ $OpenBSD: patch-miniupnpd_conf,v 1.4 201
 +#allow 1024-65535 192.168.0.0/23 22
 +#allow 12345 192.168.7.113/32 54321
  deny 0-65535 0.0.0.0/0 0-65535
-
Index: patches/patch-portinuse_c
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-portinuse_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-portinuse_c
--- patches/patch-portinuse_c 10 Sep 2016 13:03:42 -0000 1.1
+++ patches/patch-portinuse_c 8 Mar 2019 06:08:08 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-portinuse_c,v 1.1 2016/09/10 13:03:42 ajacoutot Exp $
---- portinuse.c.orig Sat Sep 10 12:03:59 2016
-+++ portinuse.c Sat Sep 10 12:04:12 2016
-@@ -17,6 +17,7 @@
+Index: portinuse.c
+--- portinuse.c.orig
++++ portinuse.c
+@@ -18,6 +18,7 @@
  #include <errno.h>
  #include <time.h>
  #include <sys/types.h>
Index: patches/patch-testasyncsendto_c
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-testasyncsendto_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-testasyncsendto_c
--- patches/patch-testasyncsendto_c 17 Jun 2015 09:51:48 -0000 1.1
+++ patches/patch-testasyncsendto_c 8 Mar 2019 06:08:08 -0000
@@ -2,23 +2,28 @@ $OpenBSD: patch-testasyncsendto_c,v 1.1
 
 warning: format '%ld' expects type 'long int', but argument 4 has type 'time_t'
 
---- testasyncsendto.c.orig Wed Jun 17 11:12:06 2015
-+++ testasyncsendto.c Wed Jun 17 11:12:44 2015
-@@ -71,7 +71,7 @@ int test(void)
+Index: testasyncsendto.c
+--- testasyncsendto.c.orig
++++ testasyncsendto.c
+@@ -74,8 +74,8 @@ int test(void)
  int max_fd;
  struct timeval timeout;
  struct timeval now;
 - syslog(LOG_DEBUG, "get_next_scheduled_send : %d next_send=%ld.%06ld",
-+ syslog(LOG_DEBUG, "get_next_scheduled_send : %d next_send=%lld.%06ld",
-       i, next_send.tv_sec, next_send.tv_usec);
+-       i, (long)next_send.tv_sec, (long)next_send.tv_usec);
++ syslog(LOG_DEBUG, "get_next_scheduled_send : %d next_send==%lld.%06ld",
++       i, (long long)next_send.tv_sec, (long)next_send.tv_usec);
  FD_ZERO(&writefds);
  max_fd = 0;
-@@ -97,7 +97,7 @@ int test(void)
+ gettimeofday(&now, NULL);
+@@ -100,8 +100,8 @@ int test(void)
  }
  }
  syslog(LOG_DEBUG, "get_sendto_fds() returned %d", i);
 - syslog(LOG_DEBUG, "select(%d, NULL, xx, NULL, %ld.%06ld)",
+-       max_fd, (long)timeout.tv_sec, (long)timeout.tv_usec);
 + syslog(LOG_DEBUG, "select(%d, NULL, xx, NULL, %lld.%06ld)",
-       max_fd, timeout.tv_sec, timeout.tv_usec);
++       max_fd, (long long)timeout.tv_sec, (long)timeout.tv_usec);
  i = select(max_fd, NULL, &writefds, NULL, &timeout);
  if(i < 0) {
+ syslog(LOG_ERR, "select: %m");
Index: patches/patch-upnpevents_c
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-upnpevents_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-upnpevents_c
--- patches/patch-upnpevents_c 10 Sep 2016 13:03:42 -0000 1.1
+++ patches/patch-upnpevents_c 8 Mar 2019 06:08:08 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-upnpevents_c,v 1.1 2016/09/10 13:03:42 ajacoutot Exp $
---- upnpevents.c.orig Sat Sep 10 12:01:20 2016
-+++ upnpevents.c Sat Sep 10 12:01:32 2016
-@@ -13,6 +13,7 @@
+Index: upnpevents.c
+--- upnpevents.c.orig
++++ upnpevents.c
+@@ -14,6 +14,7 @@
  #include <unistd.h>
  #include <time.h>
  #include <sys/types.h>
Index: patches/patch-upnpredirect_c
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-upnpredirect_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-upnpredirect_c
--- patches/patch-upnpredirect_c 10 Sep 2016 13:03:42 -0000 1.1
+++ patches/patch-upnpredirect_c 8 Mar 2019 06:08:08 -0000
@@ -1,7 +1,8 @@
 $OpenBSD: patch-upnpredirect_c,v 1.1 2016/09/10 13:03:42 ajacoutot Exp $
---- upnpredirect.c.orig Sat Sep 10 12:02:08 2016
-+++ upnpredirect.c Sat Sep 10 12:02:15 2016
-@@ -9,6 +9,7 @@
+Index: upnpredirect.c
+--- upnpredirect.c.orig
++++ upnpredirect.c
+@@ -10,6 +10,7 @@
  #include <string.h>
  #include <syslog.h>
  #include <sys/types.h>
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST 4 Sep 2018 12:46:17 -0000 1.3
+++ pkg/PLIST 8 Mar 2019 06:08:08 -0000
@@ -1,8 +1,8 @@
 @comment $OpenBSD: PLIST,v 1.3 2018/09/04 12:46:17 espie Exp $
+@rcscript ${RCDIR}/miniupnpd
 @man man/man8/miniupnpd.8
 @bin sbin/miniupnpd
 share/doc/pkg-readmes/${PKGSTEM}
 share/examples/miniupnpd/
 share/examples/miniupnpd/miniupnpd.conf
 @sample ${SYSCONFDIR}/miniupnpd.conf
-@rcscript ${RCDIR}/miniupnpd

Reply | Threaded
Open this post in threaded view
|

Re: miniupnpd-2.1

Stuart Henderson
On 2019/03/08 07:27, Björn Ketelaars wrote:

> On Fri 08/03/2019 02:55, Stuart Henderson wrote:
> > On 2019/03/07 07:09, Björn Ketelaars wrote:
> > > Diff below brings miniupnpd to the latest version (2.1). Changelog can
> > > be found at
> > > http://miniupnp.free.fr/files/changelog.php?file=miniupnpd-2.1.tar.gz
> > >
> > > (Lightly) tested at home by a PS4-fanatic.
> > >
> > > OK?
> > >
> > Either remove the whole patch (good until time_t wrap...at least it's
> > the test rather than the main code), or keep the format string patches
> > and change the cast from long to long long.
>
> I thought I had the latter in my working tree. Guess I made a mistake in
> my workflow. Thanks for noticing! New diff attached, only change is the
> long long cast.
>
> OK?

Please add this (copied from dragonfly entry below), then it's OK.

Index: patches/patch-genconfig_sh
===================================================================
RCS file: patches/patch-genconfig_sh
diff -N patches/patch-genconfig_sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-genconfig_sh 9 Mar 2019 16:07:56 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Index: genconfig.sh
+--- genconfig.sh.orig
++++ genconfig.sh
+@@ -162,7 +162,9 @@ case $OS_NAME in
+ FW=pf
+ echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE}
+ OS_URL=http://www.openbsd.org/
+- V6SOCKETS_ARE_V6ONLY=`sysctl -n net.inet6.ip6.v6only`
++ # net.inet6.ip6.v6only has been on by default for many years
++ # and this sysctl node has been removed
++ V6SOCKETS_ARE_V6ONLY=1
+ ;;
+ FreeBSD | GNU/kFreeBSD)
+ VER=`grep '#define __FreeBSD_version' /usr/include/sys/param.h | awk '{print $3}'`

Reply | Threaded
Open this post in threaded view
|

Re: miniupnpd-2.1

Steven Mestdagh-3
In reply to this post by Björn Ketelaars
Bjrn Ketelaars [2019-03-07, 07:09:48]:
> Diff below brings miniupnpd to the latest version (2.1). Changelog can
> be found at
> http://miniupnp.free.fr/files/changelog.php?file=miniupnpd-2.1.tar.gz
>
> (Lightly) tested at home by a PS4-fanatic.

these patches (from upstream) avoid crashes by null pointer dereference
on receiving a request without those parameters.

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpd/Makefile,v
retrieving revision 1.19
diff -u -p -u -r1.19 Makefile
--- Makefile 11 Mar 2019 20:05:23 -0000 1.19
+++ Makefile 18 Mar 2019 23:33:03 -0000
@@ -3,7 +3,7 @@
 COMMENT= UPnP IGD daemon
 
 DISTNAME= miniupnpd-2.1
-REVISION= 0
+REVISION= 1
 
 WANTLIB += c crypto kvm ssl
 
Index: patches/patch-upnpsoap_c
===================================================================
RCS file: patches/patch-upnpsoap_c
diff -N patches/patch-upnpsoap_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-upnpsoap_c 18 Mar 2019 23:33:03 -0000
@@ -0,0 +1,28 @@
+$OpenBSD$
+
+Index: upnpsoap.c
+--- upnpsoap.c.orig
++++ upnpsoap.c
+@@ -590,7 +590,7 @@ AddAnyPortMapping(struct upnphttp * h, const char * ac
+ if(leaseduration == 0)
+ leaseduration = 604800;
+
+- if (!int_ip || !ext_port || !int_port)
++ if (!int_ip || !ext_port || !int_port || !protocol)
+ {
+ ClearNameValueList(&data);
+ SoapError(h, 402, "Invalid Args");
+@@ -1841,6 +1841,13 @@ GetOutboundPinholeTimeout(struct upnphttp * h, const c
+ rem_host = GetValueFromNameValueList(&data, "RemoteHost");
+ rem_port = GetValueFromNameValueList(&data, "RemotePort");
+ protocol = GetValueFromNameValueList(&data, "Protocol");
++
++ if (!int_port || !rem_port || !protocol)
++ {
++ ClearNameValueList(&data);
++ SoapError(h, 402, "Invalid Args");
++ return;
++ }
+
+ rport = (unsigned short)atoi(rem_port);
+ iport = (unsigned short)atoi(int_port);

Reply | Threaded
Open this post in threaded view
|

Re: miniupnpd-2.1

Björn Ketelaars
On Tue 19/03/2019 00:40, Steven Mestdagh wrote:

> Bjrn Ketelaars [2019-03-07, 07:09:48]:
> > Diff below brings miniupnpd to the latest version (2.1). Changelog can
> > be found at
> > http://miniupnp.free.fr/files/changelog.php?file=miniupnpd-2.1.tar.gz
> >
> > (Lightly) tested at home by a PS4-fanatic.
>
> these patches (from upstream) avoid crashes by null pointer dereference
> on receiving a request without those parameters.
>
> ok?

Looks good, and works for me.

OK bket@