rpms/net-tools/devel net-tools-1.60-IA64.patch, NONE, 1.1 net-tools-1.60-large-indexes.patch, NONE, 1.1 net-tools-1.60-netstat_stop_trim.patch, 1.3, 1.4 net-tools-1.60-num-ports.patch, 1.1, 1.2 net-tools-1.60-overflow.patch, 1.1, 1.2 net-tools-1.60-trunc.patch, 1.1, 1.2 net-tools.spec, 1.106, 1.107

Jiří Popelka jpopelka at fedoraproject.org
Sat Jan 2 11:51:32 UTC 2010


Author: jpopelka

Update of /cvs/pkgs/rpms/net-tools/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32459

Modified Files:
	net-tools-1.60-netstat_stop_trim.patch 
	net-tools-1.60-num-ports.patch net-tools-1.60-overflow.patch 
	net-tools-1.60-trunc.patch net-tools.spec 
Added Files:
	net-tools-1.60-IA64.patch net-tools-1.60-large-indexes.patch 
Log Message:
* Sat Jan  2 2010  Jiri Popelka <jpopelka at redhat.com> - 1.60-101
- fixed overflow patch (#551625)
- ifconfig interface:0 del <IP> will remove the Aliased IP on IA64 (#473211)
- interface slip: cast keepalive/outfill to unsigned long to fix warnings on 64bit hosts -- no functional changes since these only have an 8bit range anyways
- interface: fix IPv6 parsing of interfaces with large indexes (> 255) (Debian #433543)


net-tools-1.60-IA64.patch:
 ifconfig.c      |    3 ++-
 lib/interface.c |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

--- NEW FILE net-tools-1.60-IA64.patch ---
diff -up net-tools-1.60/ifconfig.c.IA64 net-tools-1.60/ifconfig.c
--- net-tools-1.60/ifconfig.c.IA64	2010-01-02 11:35:39.000000000 +0100
+++ net-tools-1.60/ifconfig.c	2010-01-02 11:35:39.000000000 +0100
@@ -894,7 +894,8 @@ int main(int argc, char **argv)
 		    continue;
 		}
 		
-		memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long));
+		memset(&ip, 0, sizeof(unsigned long));
+		memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr));
 		
 		if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) {
 		    fprintf(stderr, _("Interface %s not initialized\n"),
diff -up net-tools-1.60/lib/interface.c.IA64 net-tools-1.60/lib/interface.c
--- net-tools-1.60/lib/interface.c.IA64	2010-01-02 11:35:39.000000000 +0100
+++ net-tools-1.60/lib/interface.c	2010-01-02 12:03:05.000000000 +0100
@@ -491,14 +491,14 @@ int if_fetch(struct interface *ife)
 	if (ioctl(skfd, SIOCGOUTFILL, &ifr) < 0)
 	    ife->outfill = 0;
 	else
-	    ife->outfill = (unsigned int) ifr.ifr_data;
+	    ife->outfill = (unsigned long) ifr.ifr_data;
 #endif
 #ifdef SIOCGKEEPALIVE
 	strcpy(ifr.ifr_name, ifname);
 	if (ioctl(skfd, SIOCGKEEPALIVE, &ifr) < 0)
 	    ife->keepalive = 0;
 	else
-	    ife->keepalive = (unsigned int) ifr.ifr_data;
+	    ife->keepalive = (unsigned long) ifr.ifr_data;
 #endif
     }
 #endif

net-tools-1.60-large-indexes.patch:
 interface.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE net-tools-1.60-large-indexes.patch ---
diff -up net-tools-1.60/lib/interface.c.large-indexes net-tools-1.60/lib/interface.c
--- net-tools-1.60/lib/interface.c.large-indexes	2010-01-02 12:05:13.000000000 +0100
+++ net-tools-1.60/lib/interface.c	2010-01-02 12:34:24.000000000 +0100
@@ -766,7 +766,7 @@ void ife_print_long(struct interface *pt
     /* FIXME: should be integrated into interface.c.   */
 
     if ((f = fopen(_PATH_PROCNET_IFINET6, "r")) != NULL) {
-	while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n",
+	while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %08x %02x %02x %02x %20s\n",
 		      addr6p[0], addr6p[1], addr6p[2], addr6p[3],
 		      addr6p[4], addr6p[5], addr6p[6], addr6p[7],
 		  &if_idx, &plen, &scope, &dad_status, devname) != EOF) {

net-tools-1.60-netstat_stop_trim.patch:
 man/en_US/netstat.8 |    4 ++++
 netstat.c           |   27 ++++++++++++++++++++-------
 2 files changed, 24 insertions(+), 7 deletions(-)

Index: net-tools-1.60-netstat_stop_trim.patch
===================================================================
RCS file: /cvs/pkgs/rpms/net-tools/devel/net-tools-1.60-netstat_stop_trim.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- net-tools-1.60-netstat_stop_trim.patch	7 Jun 2006 10:37:05 -0000	1.3
+++ net-tools-1.60-netstat_stop_trim.patch	2 Jan 2010 11:51:31 -0000	1.4
@@ -23,7 +23,7 @@
  
  FILE *procinfo;
  
-@@ -980,17 +983,21 @@
+@@ -980,16 +983,20 @@
  		 get_sname(htons(local_port), "tcp",
  			   flag_not & FLAG_NUM_PORT));
  
@@ -35,8 +35,7 @@
 +	}
  
  	strcat(local_addr, ":");
- 	strncat(local_addr, buffer, sizeof(local_addr));
- 	local_addr[sizeof(local_addr)-1] = 0;
+ 	strncat(local_addr, buffer, sizeof(local_addr)-strlen(local_addr)-1);
  	snprintf(buffer, sizeof(buffer), "%s",
  		 get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
 -
@@ -49,7 +48,7 @@
 +	}
  
  	strcat(rem_addr, ":");
- 	strncat(rem_addr, buffer, sizeof(rem_addr));
+ 	strncat(rem_addr, buffer, sizeof(rem_addr)-strlen(rem_addr)-1);
 @@ -1776,6 +1783,7 @@
  	{"fib", 0, 0, 'F'},
  	{"groups", 0, 0, 'g'},

net-tools-1.60-num-ports.patch:
 netstat.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Index: net-tools-1.60-num-ports.patch
===================================================================
RCS file: /cvs/pkgs/rpms/net-tools/devel/net-tools-1.60-num-ports.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- net-tools-1.60-num-ports.patch	25 Nov 2004 14:07:55 -0000	1.1
+++ net-tools-1.60-num-ports.patch	2 Jan 2010 11:51:31 -0000	1.2
@@ -24,7 +24,7 @@
 +	if ((strlen(local_addr) + strlen(buffer)) >= 27)
  	    local_addr[22 - strlen(buffer)] = '\0';
  	strcat(local_addr, ":");
- 	strncat(local_addr, buffer, sizeof(local_addr));
+ 	strncat(local_addr, buffer, sizeof(local_addr)-strlen(local_addr)-1);
 @@ -934,8 +934,8 @@
  	snprintf(buffer, sizeof(buffer), "%s",
  		 get_sname(htons(rem_port), "udp", flag_not & FLAG_NUM_PORT));
@@ -35,7 +35,7 @@
 +	if ((strlen(rem_addr) + strlen(buffer)) >= 27)
  	    rem_addr[22 - strlen(buffer)] = '\0';
  	strcat(rem_addr, ":");
- 	strncat(rem_addr, buffer, sizeof(rem_addr));
+ 	strncat(rem_addr, buffer, sizeof(rem_addr)-strlen(rem_addr)-1);
 @@ -958,7 +958,7 @@
  			 retr, timeout);
  		break;
@@ -55,7 +55,7 @@
 +	if ((strlen(local_addr) + strlen(buffer)) >= 27)
  	    local_addr[22 - strlen(buffer)] = '\0';
  	strcat(local_addr, ":");
- 	strncat(local_addr, buffer, sizeof(local_addr));
+ 	strncat(local_addr, buffer, sizeof(local_addr)-strlen(local_addr)-1);
 @@ -1055,8 +1055,8 @@
  	snprintf(buffer, sizeof(buffer), "%s",
  		 get_sname(htons(rem_port), "raw", flag_not & FLAG_NUM_PORT));
@@ -66,7 +66,7 @@
 +	if ((strlen(rem_addr) + strlen(buffer)) >= 27)
  	    rem_addr[22 - strlen(buffer)] = '\0';
  	strcat(rem_addr, ":");
- 	strncat(rem_addr, buffer, sizeof(rem_addr));
+ 	strncat(rem_addr, buffer, sizeof(rem_addr)-strlen(rem_addr)-1);
 @@ -1081,7 +1081,7 @@
  			 retr, timeout);
  		break;

net-tools-1.60-overflow.patch:
 netstat.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Index: net-tools-1.60-overflow.patch
===================================================================
RCS file: /cvs/pkgs/rpms/net-tools/devel/net-tools-1.60-overflow.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- net-tools-1.60-overflow.patch	9 Sep 2004 09:12:39 -0000	1.1
+++ net-tools-1.60-overflow.patch	2 Jan 2010 11:51:31 -0000	1.2
@@ -1,63 +1,57 @@
-diff -ur net-tools-1.60.orig/netstat.c net-tools-1.60/netstat.c
---- net-tools-1.60.orig/netstat.c	2004-04-07 11:47:05.000000000 -0400
-+++ net-tools-1.60/netstat.c	2004-04-07 16:47:15.000000000 -0400
-@@ -777,7 +777,8 @@
+diff -up net-tools-1.60/netstat.c.overflow net-tools-1.60/netstat.c
+--- net-tools-1.60/netstat.c.overflow	2010-01-02 10:45:45.000000000 +0100
++++ net-tools-1.60/netstat.c	2010-01-02 10:50:50.000000000 +0100
+@@ -777,7 +777,7 @@ static void tcp_do_one(int lnr, const ch
  	    local_addr[22 - strlen(buffer)] = '\0';
  
  	strcat(local_addr, ":");
 -	strcat(local_addr, buffer);
-+	strncat(local_addr, buffer, sizeof(local_addr));
-+	local_addr[sizeof(local_addr)-1] = 0;
++	strncat(local_addr, buffer, sizeof(local_addr)-strlen(local_addr)-1);
  	snprintf(buffer, sizeof(buffer), "%s",
  		 get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
  
-@@ -785,7 +786,8 @@
+@@ -785,7 +785,7 @@ static void tcp_do_one(int lnr, const ch
  	    rem_addr[22 - strlen(buffer)] = '\0';
  
  	strcat(rem_addr, ":");
 -	strcat(rem_addr, buffer);
-+	strncat(rem_addr, buffer, sizeof(rem_addr));
-+	rem_addr[sizeof(rem_addr)-1] = 0;
++	strncat(rem_addr, buffer, sizeof(rem_addr)-strlen(rem_addr)-1);
  	timers[0] = '\0';
  
  	if (flag_opt)
-@@ -926,7 +928,8 @@
+@@ -926,7 +926,7 @@ static void udp_do_one(int lnr, const ch
  	if ((strlen(local_addr) + strlen(buffer)) > 22)
  	    local_addr[22 - strlen(buffer)] = '\0';
  	strcat(local_addr, ":");
 -	strcat(local_addr, buffer);
-+	strncat(local_addr, buffer, sizeof(local_addr));
-+	local_addr[sizeof(local_addr)-1] = 0;
++	strncat(local_addr, buffer, sizeof(local_addr)-strlen(local_addr)-1);
  
  	snprintf(buffer, sizeof(buffer), "%s",
  		 get_sname(htons(rem_port), "udp", flag_not & FLAG_NUM_PORT));
-@@ -935,7 +938,8 @@
+@@ -935,7 +935,7 @@ static void udp_do_one(int lnr, const ch
  	if ((strlen(rem_addr) + strlen(buffer)) > 22)
  	    rem_addr[22 - strlen(buffer)] = '\0';
  	strcat(rem_addr, ":");
 -	strcat(rem_addr, buffer);
-+	strncat(rem_addr, buffer, sizeof(rem_addr));
-+	rem_addr[sizeof(rem_addr)-1] = 0;
++	strncat(rem_addr, buffer, sizeof(rem_addr)-strlen(rem_addr)-1);
  
  	timers[0] = '\0';
  	if (flag_opt)
-@@ -1045,7 +1049,8 @@
+@@ -1045,7 +1045,7 @@ static void raw_do_one(int lnr, const ch
  	if ((strlen(local_addr) + strlen(buffer)) > 22)
  	    local_addr[22 - strlen(buffer)] = '\0';
  	strcat(local_addr, ":");
 -	strcat(local_addr, buffer);
-+	strncat(local_addr, buffer, sizeof(local_addr));
-+	local_addr[sizeof(local_addr)-1] = 0;
++	strncat(local_addr, buffer, sizeof(local_addr)-strlen(local_addr)-1);
  
  	snprintf(buffer, sizeof(buffer), "%s",
  		 get_sname(htons(rem_port), "raw", flag_not & FLAG_NUM_PORT));
-@@ -1054,7 +1059,8 @@
+@@ -1054,7 +1054,7 @@ static void raw_do_one(int lnr, const ch
  	if ((strlen(rem_addr) + strlen(buffer)) > 22)
  	    rem_addr[22 - strlen(buffer)] = '\0';
  	strcat(rem_addr, ":");
 -	strcat(rem_addr, buffer);
-+	strncat(rem_addr, buffer, sizeof(rem_addr));
-+	rem_addr[sizeof(rem_addr)-1] = 0;
++	strncat(rem_addr, buffer, sizeof(rem_addr)-strlen(rem_addr)-1);
  
  	timers[0] = '\0';
  	if (flag_opt)

net-tools-1.60-trunc.patch:
 netstat.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Index: net-tools-1.60-trunc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/net-tools/devel/net-tools-1.60-trunc.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- net-tools-1.60-trunc.patch	9 Sep 2004 09:14:10 -0000	1.1
+++ net-tools-1.60-trunc.patch	2 Jan 2010 11:51:31 -0000	1.2
@@ -10,7 +10,7 @@
 +	    local_addr[27 - strlen(buffer) - 1] = '\0';
  
  	strcat(local_addr, ":");
- 	strncat(local_addr, buffer, sizeof(local_addr));
+ 	strncat(local_addr, buffer, sizeof(local_addr)-strlen(local_addr)-1);
 @@ -782,8 +782,8 @@
  	snprintf(buffer, sizeof(buffer), "%s",
  		 get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
@@ -21,7 +21,7 @@
 +	    rem_addr[27 - strlen(buffer) - 1] = '\0';
  
  	strcat(rem_addr, ":");
- 	strncat(rem_addr, buffer, sizeof(rem_addr));
+ 	strncat(rem_addr, buffer, sizeof(rem_addr)-strlen(rem_addr)-1);
 @@ -816,7 +816,7 @@
  			 timer_run, (double) time_len / HZ, retr, timeout);
  		break;


Index: net-tools.spec
===================================================================
RCS file: /cvs/pkgs/rpms/net-tools/devel/net-tools.spec,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -p -r1.106 -r1.107
--- net-tools.spec	21 Dec 2009 13:04:15 -0000	1.106
+++ net-tools.spec	2 Jan 2010 11:51:31 -0000	1.107
@@ -1,7 +1,7 @@
 Summary: Basic networking tools
 Name: net-tools
 Version: 1.60
-Release: 100%{?dist}
+Release: 101%{?dist}
 License: GPL+
 Group: System Environment/Base
 URL: http://net-tools.berlios.de/
@@ -117,6 +117,13 @@ Patch82: net-tools-1.60-hostname-short.p
 # use <linux/mii.h> instead of "mii.h" and fix Bug #491358
 Patch83: net-tools-1.60-mii-refactor.patch
 
+# Bug 473211: ifconfig interface:0 del <IP> will remove the Aliased IP on IA64
+# interface slip: cast keepalive/outfill to unsigned long to fix warnings on 64bit hosts -- no functional changes since these only have an 8bit range anyways
+Patch84: net-tools-1.60-IA64.patch
+
+# interface: fix IPv6 parsing of interfaces with large indexes (> 255) (Debian #433543)
+Patch85: net-tools-1.60-large-indexes.patch
+
 BuildRequires: gettext, libselinux
 BuildRequires: libselinux-devel
 Requires: hostname
@@ -205,6 +212,8 @@ Most of them are obsolete. For replaceme
 %patch81 -p1 -b .slattach-fchown
 %patch82 -p1 -b .hostname-short
 %patch83 -p1 -b .mii-refactor
+%patch84 -p1 -b .IA64
+%patch85 -p1 -b .large-indexes
 
 cp %SOURCE1 ./config.h
 cp %SOURCE2 ./config.make
@@ -304,6 +313,12 @@ rm -rf %{buildroot}
 %config(noreplace) %{_sysconfdir}/ethers
 
 %changelog
+* Sat Jan  2 2010  Jiri Popelka <jpopelka at redhat.com> - 1.60-101
+- fixed overflow patch (#551625)
+- ifconfig interface:0 del <IP> will remove the Aliased IP on IA64 (#473211)
+- interface slip: cast keepalive/outfill to unsigned long to fix warnings on 64bit hosts -- no functional changes since these only have an 8bit range anyways
+- interface: fix IPv6 parsing of interfaces with large indexes (> 255) (Debian #433543)
+
 * Mon Dec 21 2009  Jiri Popelka <jpopelka at redhat.com> - 1.60-100
 - Move hostname to separate package
 




More information about the fedora-extras-commits mailing list