Bug 187105 - [PATCH] net/miniupnpd fix incrrect redirect filter
Summary: [PATCH] net/miniupnpd fix incrrect redirect filter
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-27 06:30 UTC by hashiz
Modified: 2014-03-15 13:40 UTC (History)
0 users

See Also:


Attachments
miniupnpd.patch (3.02 KB, patch)
2014-02-27 06:30 UTC, hashiz
no flags Details | Diff
miniupnpd-1.8.20140310.patch (962 bytes, patch)
2014-03-12 14:16 UTC, Tor Halvard Furulund
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hashiz 2014-02-27 06:30:00 UTC
	net/miniupnpd add incorrect filter rule at AddPortMapping request.

Fix: filter rule's port number must be 'internal' port number.
How-To-Repeat: 	Invite remote assistance from windows client on internal network.
	show 'pfctl -a miniupnpd -s rules; pfctl -a miniupnpd -s nat'
        rdr rule is correct, but filter rule port number is incorrect (external port number).
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-27 06:30:09 UTC
Maintainer of net/miniupnpd,

Please note that PR ports/187105 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/187105

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-27 06:30:10 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Tor Halvard Furulund 2014-03-03 14:56:39 UTC
Looks good to me,
but my lack of programming skills cannot say if this should be done any 
other way or something.

Personally I would prefer patches like this submitted upstream instead 
of in the ports three, but part of the port looks unusable for those who 
use the filter part.
Can the submitter share this patch directly with the miniupnpd-project? 
Or may I do so?
(Create a new topic at 
http://miniupnp.tuxfamily.org/forum/viewforum.php?f=3 )

--
Tor Halvard Furulund
Maintainer of net/miniupnpd
Comment 4 hashiz 2014-03-10 08:46:49 UTC
----Next_Part(Mon_Mar_10_17_46_49_2014_154)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I reported this problem to upstream maintainer.
Maintainer accept and made a new release.

I resend a patch to upgrade new release.


----Next_Part(Mon_Mar_10_17_46_49_2014_154)--
Content-Type: Text/X-Patch; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="miniupnpd-1.8.20140310.patch"

diff -ru miniupnpd.orig/Makefile miniupnpd/Makefile
--- miniupnpd.orig/Makefile	2014-01-26 23:27:10.000000000 +0900
+++ miniupnpd/Makefile	2014-03-10 15:39:19.000000000 +0900
@@ -3,11 +3,12 @@
 
 PORTNAME=	miniupnpd
 PORTVERSION=	1.8
-PORTREVISION=	1
+PORTREVISION=	20140310
 PORTEPOCH=	1
 CATEGORIES=	net
 MASTER_SITES=	http://miniupnp.tuxfamily.org/files/ \
 		http://miniupnp.free.fr/files/
+DISTNAME=	${PORTNAME}-${PORTVERSION}.${PORTREVISION}
 
 MAINTAINER=	squat@squat.no
 COMMENT=	UPnP IGD implementation which uses pf/ipf
diff -ru miniupnpd.orig/distinfo miniupnpd/distinfo
--- miniupnpd.orig/distinfo	2014-01-23 00:30:13.000000000 +0900
+++ miniupnpd/distinfo	2014-03-10 15:39:20.000000000 +0900
@@ -1,2 +1,2 @@
-SHA256 (miniupnpd-1.8.tar.gz) = e453a9225a2883e759d09e15c51bb0265b8a019d1132434131e6929fef0076bb
-SIZE (miniupnpd-1.8.tar.gz) = 146679
+SHA256 (miniupnpd-1.8.20140310.tar.gz) = 733530eee970bfc29f90b0a793612d2c721eb4f19f9c50f6d7677b6e0d59a726
+SIZE (miniupnpd-1.8.20140310.tar.gz) = 176585

----Next_Part(Mon_Mar_10_17_46_49_2014_154)----
Comment 5 hashiz 2014-03-12 03:27:29 UTC
I agree with your patch.

2014-03-11 0:36 GMT+09:00 Tor Halvard Furulund <squat@squat.no>:
> Thanks for sending this upstream.
>
> As maintainer I approve HASHI Hiroakis latest patch, I have also attached an alternative.
>
> I am not sure if HASHI Hiroakis creative usage of PORTREVISION is prefered? Makes it hard to bump PORTREVISION without changing the DISTNAME or something creative.
>
> My vote is more for changing PORTVERSION to 1.8.20140310 and remove the PORTREVISION- and DISTNAME-entries. That would break for an possible future 1.8.1-release (without PORTEPOCH), but the miniupnpd-project seems to use 1.8 (major.minor) via the in-between/devel-releases named 1.8.date (major.minor.date) to 1.9 (major.minor).
>
> An second alternative can be to set the version to 1.8.0.20140310 and use other variables to get DISTNAME and the other variables properly.
>
> --
> Tor Halvard Furulund
> Maintainer of net/miniupnpd




-- 
$B66(B $B9(>4(B Hashi, Hiroaki <hashiz@meridiani.jp>
Comment 6 Tor Halvard Furulund 2014-03-12 14:16:55 UTC
Thanks for sending this upstream.

As maintainer I approve HASHI Hiroakis latest patch, I have also 
attached an alternative.

I am not sure if HASHI Hiroakis creative usage of PORTREVISION is 
prefered? Makes it hard to bump PORTREVISION without changing the 
DISTNAME or something creative.

My vote is more for changing PORTVERSION to 1.8.20140310 and remove the 
PORTREVISION- and DISTNAME-entries. That would break for an possible 
future 1.8.1-release (without PORTEPOCH), but the miniupnpd-project 
seems to use 1.8 (major.minor) via the in-between/devel-releases named 
1.8.date (major.minor.date) to 1.9 (major.minor).

A second alternative can be to set the version to 1.8.0.20140310 and use 
other variables to get DISTNAME and the other variables properly.

-- 
Tor Halvard Furulund
Maintainer of net/miniupnpd
Comment 7 Pawel Pekala freebsd_committer freebsd_triage 2014-03-15 13:15:43 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pawel

I'll take it.
Comment 8 dfilter service freebsd_committer freebsd_triage 2014-03-15 13:38:40 UTC
Author: pawel
Date: Sat Mar 15 13:38:35 2014
New Revision: 348324
URL: http://svnweb.freebsd.org/changeset/ports/348324
QAT: https://qat.redports.org/buildarchive/r348324/

Log:
  - Update to version 1.8.20140310 [1]
  - Use option helper
  
  PR:		ports/187105 [1]
  Submitted by:	maintainer

Modified:
  head/net/miniupnpd/Makefile
  head/net/miniupnpd/distinfo

Modified: head/net/miniupnpd/Makefile
==============================================================================
--- head/net/miniupnpd/Makefile	Sat Mar 15 13:37:33 2014	(r348323)
+++ head/net/miniupnpd/Makefile	Sat Mar 15 13:38:35 2014	(r348324)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	miniupnpd
-PORTVERSION=	1.8
-PORTREVISION=	1
+PORTVERSION=	1.8.20140310
 PORTEPOCH=	1
 CATEGORIES=	net
 MASTER_SITES=	http://miniupnp.tuxfamily.org/files/ \
@@ -26,10 +25,7 @@ USE_RC_SUBR=	miniupnpd
 OPTIONS_DEFINE=	PF_ENABLE_FILTER_RULES
 PF_ENABLE_FILTER_RULES_DESC=	Enable pf generation of filter rules
 
-.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MPF_ENABLE_FILTER_RULES}
-EXTRA_PATCHES=	${PATCHDIR}/pf_enable_filter_rules.patch
-.endif
+PF_ENABLE_FILTER_RULES_EXTRA_PATCHES=	${PATCHDIR}/pf_enable_filter_rules.patch
 
 post-patch-script:
 	@${REINPLACE_CMD} 's|CFLAGS ?= -pipe -Os|CFLAGS ?= -pipe|' \

Modified: head/net/miniupnpd/distinfo
==============================================================================
--- head/net/miniupnpd/distinfo	Sat Mar 15 13:37:33 2014	(r348323)
+++ head/net/miniupnpd/distinfo	Sat Mar 15 13:38:35 2014	(r348324)
@@ -1,2 +1,2 @@
-SHA256 (miniupnpd-1.8.tar.gz) = e453a9225a2883e759d09e15c51bb0265b8a019d1132434131e6929fef0076bb
-SIZE (miniupnpd-1.8.tar.gz) = 146679
+SHA256 (miniupnpd-1.8.20140310.tar.gz) = 733530eee970bfc29f90b0a793612d2c721eb4f19f9c50f6d7677b6e0d59a726
+SIZE (miniupnpd-1.8.20140310.tar.gz) = 176585
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 9 Pawel Pekala freebsd_committer freebsd_triage 2014-03-15 13:38:48 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!