rpms/net-tools/devel net-tools-1.60-ifconfig-long-iface-crasher.patch, NONE, 1.1 net-tools-1.60-netdevice.patch, NONE, 1.1 net-tools.spec, 1.67, 1.68

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue May 9 09:27:17 UTC 2006


Author: rvokal

Update of /cvs/dist/rpms/net-tools/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv13939

Modified Files:
	net-tools.spec 
Added Files:
	net-tools-1.60-ifconfig-long-iface-crasher.patch 
	net-tools-1.60-netdevice.patch 
Log Message:
 - add netdevice.h, fix x25
 - fix ifconfig crash when interface name is too long (#190703)


net-tools-1.60-ifconfig-long-iface-crasher.patch:
 interface.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletion(-)

--- NEW FILE net-tools-1.60-ifconfig-long-iface-crasher.patch ---
diff -Naurp net-tools-1.60-ifconfig-new/lib/interface.c net-tools-1.60-ifconfig/lib/interface.c
--- net-tools-1.60-ifconfig-new/lib/interface.c	2006-03-23 07:02:48.000000000 +0100
+++ net-tools-1.60-ifconfig/lib/interface.c	2006-03-23 09:58:45.000000000 +0100
@@ -203,6 +203,7 @@ out:
 
 static char *get_name(char *name, char *p)
 {
+    int count = 0;	
     while (isspace(*p))
 	p++;
     while (*p) {
@@ -211,8 +212,13 @@ static char *get_name(char *name, char *
 	if (*p == ':') {	/* could be an alias */
 	    char *dot = p, *dotname = name;
 	    *name++ = *p++;
-	    while (isdigit(*p))
+	    count++;
+	    while (isdigit(*p)){
 		*name++ = *p++;
+	        count++;
+	 	if (count == (IFNAMSIZ-1))
+	    	      break;
+	    }
 	    if (*p != ':') {	/* it wasn't, backup */
 		p = dot;
 		name = dotname;
@@ -223,6 +229,9 @@ static char *get_name(char *name, char *
 	    break;
 	}
 	*name++ = *p++;
+	count++;
+	if (count == (IFNAMSIZ-1))
+    	      break;
     }
     *name++ = '\0';
     return p;

net-tools-1.60-netdevice.patch:
 fddi.c   |    2 ++
 x25_sr.c |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

--- NEW FILE net-tools-1.60-netdevice.patch ---
--- net-tools-1.60/lib/fddi.c.netdevice	2000-03-05 12:26:02.000000000 +0100
+++ net-tools-1.60/lib/fddi.c	2006-05-09 11:19:51.000000000 +0200
@@ -26,6 +26,8 @@
 #error "No FDDI Support in your current Kernelsource Tree."
 #error "Disable HW Type FDDI"
 #endif
+#include <linux/netdevice.h>
+#include <asm/byteorder.h>
 #if __GLIBC__ >= 2
 #include <netinet/if_fddi.h>
 #else
--- net-tools-1.60/lib/x25_sr.c.netdevice	2000-05-20 15:38:10.000000000 +0200
+++ net-tools-1.60/lib/x25_sr.c	2006-05-09 11:20:15.000000000 +0200
@@ -77,7 +77,7 @@
   rt.sigdigits=sigdigits;
 
   /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */
-  memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address));
+  memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address));
 
   while (*args) {
 	if (!strcmp(*args,"device") || !strcmp(*args,"dev")) {


Index: net-tools.spec
===================================================================
RCS file: /cvs/dist/rpms/net-tools/devel/net-tools.spec,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- net-tools.spec	2 May 2006 12:49:04 -0000	1.67
+++ net-tools.spec	9 May 2006 09:27:14 -0000	1.68
@@ -65,6 +65,8 @@
 Patch51: net-tools-1.60-x25-proc.patch
 Patch52: net-tools-1.60-sctp.patch
 Patch53: net-tools-1.60-arp_man.patch
+Patch54: net-tools-1.60-ifconfig-long-iface-crasher.patch
+Patch55: net-tools-1.60-netdevice.patch
 
 BuildRoot: %{_tmppath}/%{name}-root
 Requires(post,preun): chkconfig
@@ -126,6 +128,8 @@
 %patch51 -p1 -b .x25
 %patch52 -p1 -b .sctp
 %patch53 -p1
+%patch54 -p1 -b .long_iface
+%patch55 -p1 -b .netdevice
 
 cp %SOURCE2 ./config.h
 cp %SOURCE3 ./config.make
@@ -237,6 +241,10 @@
 %{_sysconfdir}/rc.d/init.d/netplugd
 
 %changelog
+* Tue May 09 2006 Radek Vokál <rvokal at redhat.com> - 1.60-70
+- add netdevice.h, fix x25
+- fix ifconfig crash when interface name is too long (#190703)
+
 * Tue May 02 2006 Radek Vokál <rvokal at redhat.com> - 1.60-69
 - fix arp man page to correspond to man ethers (#190425)
 




More information about the fedora-cvs-commits mailing list