Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37046862
en ru br
ALT Linux repos
S:1.8.7-alt1
5.0: 1.4.0-alt4
4.1: 1.4.0-alt0.M41.1
4.0: 1.3.7-alt1
3.0: 1.3.1-alt2

Group :: System/Kernel and hardware
RPM: iptables

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: iptables-1.4.0-alt-parse_port.patch
Download


--- iptables-1.4.0/extensions/libipt_MASQUERADE.c
+++ iptables-1.4.0/extensions/libipt_MASQUERADE.c
@@ -60,7 +60,7 @@ parse_ports(const char *arg, struct ip_nat_multi_range *mr)
 		int maxport;
 
 		maxport = atoi(dash + 1);
-		if (maxport == 0 || maxport > 65535)
+		if (maxport <= 0 || maxport > 65535)
 			exit_error(PARAMETER_PROBLEM,
 				   "Port `%s' not valid\n", dash+1);
 		if (maxport < port)
--- iptables-1.4.0/extensions/libipt_REDIRECT.c
+++ iptables-1.4.0/extensions/libipt_REDIRECT.c
@@ -50,7 +50,7 @@ parse_ports(const char *arg, struct ip_nat_multi_range *mr)
 		exit_error(PARAMETER_PROBLEM, "IP address not permitted\n");
 
 	port = atoi(arg);
-	if (port == 0 || port > 65535)
+	if (port <= 0 || port > 65535)
 		exit_error(PARAMETER_PROBLEM, "Port `%s' not valid\n", arg);
 
 	dash = strchr(arg, '-');
@@ -62,7 +62,7 @@ parse_ports(const char *arg, struct ip_nat_multi_range *mr)
 		int maxport;
 
 		maxport = atoi(dash + 1);
-		if (maxport == 0 || maxport > 65535)
+		if (maxport <= 0 || maxport > 65535)
 			exit_error(PARAMETER_PROBLEM,
 				   "Port `%s' not valid\n", dash+1);
 		if (maxport < port)
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin