Unverified Commit fcba5123 authored by Eugene Grosbein's avatar Eugene Grosbein
Browse files

net/mpd5: let "red-port" accept zero remote port value

Import upstream r2446: allow to configre "any" remote port
for port redirection rule as supported by libalias(3).

PR:		261802
Reported by:	Martin Birgmeier
parent e24f1539
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

PORTNAME=	mpd
DISTVERSION=	5.9
PORTREVISION=	6
PORTREVISION=	7
CATEGORIES=	net
MASTER_SITES=	SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION}
PKGNAMESUFFIX=	5
+13 −0
Original line number Diff line number Diff line
Index: src/nat.c
===================================================================
--- src/nat.c	(revision 2445)
+++ src/nat.c	(revision 2446)
@@ -192,7 +192,7 @@ NatSetCommand(Context ctx, int ac, const char *const a
 	  if (!inet_aton (av[5], &r_addr))
 	    Error("bad remote IP address \"%s\"", av[5]);
 	  rp = atoi(av[6]);
-	  if (rp <= 0 || rp > 65535)
+	  if (rp < 0 || rp > 65535)
 	    Error("Incorrect remote port number \"%s\"", av[6]);
 	}
 	/* OK */