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
This commit is contained in:
Eugene Grosbein 2022-02-11 20:31:47 +07:00
parent e24f1539bd
commit fcba5123c1
No known key found for this signature in database
GPG key ID: B0CD1AF226988B28
2 changed files with 14 additions and 1 deletions

View file

@ -2,7 +2,7 @@
PORTNAME= mpd
DISTVERSION= 5.9
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= net
MASTER_SITES= SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION}
PKGNAMESUFFIX= 5

View file

@ -0,0 +1,13 @@
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 */