rpms/net-tools/devel net-tools-1.60-arp-unaligned-access.patch, NONE, 1.1 net-tools.spec, 1.79, 1.80
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Dec 27 08:34:06 UTC 2006
- Previous message (by thread): rpms/autofs/FC-6 autofs-5.0.1-rc2-disallow-multiple-indirect-mounts-fix.patch, NONE, 1.1 autofs-5.0.1-rc2-fix-nonstrict-multi-mounts.patch, NONE, 1.1 autofs.spec, 1.162, 1.163
- Next message (by thread): rpms/dev86/devel dev86-x86_64.patch,NONE,1.1 dev86.spec,1.19,1.20
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rvokal
Update of /cvs/dist/rpms/net-tools/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10401
Modified Files:
net-tools.spec
Added Files:
net-tools-1.60-arp-unaligned-access.patch
Log Message:
- fix arp unaligned access (#220438)
net-tools-1.60-arp-unaligned-access.patch:
arp.c | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
--- NEW FILE net-tools-1.60-arp-unaligned-access.patch ---
--- net-tools-1.60/arp.c 2001-04-08 10:05:05.000000000 -0700
+++ net-tools-1.60.new/arp.c 2006-01-31 13:10:01.479716750 -0800
@@ -100,7 +100,7 @@ static int arp_del(char **args)
{
char host[128];
struct arpreq req;
- struct sockaddr sa;
+ struct sockaddr_storage ss;
int flags = 0;
int err;
@@ -112,12 +112,12 @@ static int arp_del(char **args)
return (-1);
}
safe_strncpy(host, *args, (sizeof host));
- if (ap->input(0, host, &sa) < 0) {
+ if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
ap->herror(host);
return (-1);
}
/* If a host has more than one address, use the correct one! */
- memcpy((char *) &req.arp_pa, (char *) &sa, sizeof(struct sockaddr));
+ memcpy((char *) &req.arp_pa, (char *) &ss, sizeof(struct sockaddr));
if (hw_set)
req.arp_ha.sa_family = hw->type;
@@ -177,11 +177,11 @@ static int arp_del(char **args)
usage();
if (strcmp(*args, "255.255.255.255") != 0) {
strcpy(host, *args);
- if (ap->input(0, host, &sa) < 0) {
+ if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
ap->herror(host);
return (-1);
}
- memcpy((char *) &req.arp_netmask, (char *) &sa,
+ memcpy((char *) &req.arp_netmask, (char *) &ss,
sizeof(struct sockaddr));
req.arp_flags |= ATF_NETMASK;
}
@@ -260,7 +260,7 @@ static int arp_set(char **args)
{
char host[128];
struct arpreq req;
- struct sockaddr sa;
+ struct sockaddr_storage ss;
int flags;
memset((char *) &req, 0, sizeof(req));
@@ -271,12 +271,12 @@ static int arp_set(char **args)
return (-1);
}
safe_strncpy(host, *args++, (sizeof host));
- if (ap->input(0, host, &sa) < 0) {
+ if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
ap->herror(host);
return (-1);
}
/* If a host has more than one address, use the correct one! */
- memcpy((char *) &req.arp_pa, (char *) &sa, sizeof(struct sockaddr));
+ memcpy((char *) &req.arp_pa, (char *) &ss, sizeof(struct sockaddr));
/* Fetch the hardware address. */
if (*args == NULL) {
@@ -346,11 +346,11 @@ static int arp_set(char **args)
usage();
if (strcmp(*args, "255.255.255.255") != 0) {
strcpy(host, *args);
- if (ap->input(0, host, &sa) < 0) {
+ if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
ap->herror(host);
return (-1);
}
- memcpy((char *) &req.arp_netmask, (char *) &sa,
+ memcpy((char *) &req.arp_netmask, (char *) &ss,
sizeof(struct sockaddr));
flags |= ATF_NETMASK;
}
@@ -519,7 +519,7 @@ static void arp_disp(char *name, char *i
static int arp_show(char *name)
{
char host[100];
- struct sockaddr sa;
+ struct sockaddr_storage ss;
char ip[100];
char hwa[100];
char mask[100];
@@ -535,11 +535,11 @@ static int arp_show(char *name)
if (name != NULL) {
/* Resolve the host name. */
safe_strncpy(host, name, (sizeof host));
- if (ap->input(0, host, &sa) < 0) {
+ if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
ap->herror(host);
return (-1);
}
- safe_strncpy(host, ap->sprint(&sa, 1), sizeof(host));
+ safe_strncpy(host, ap->sprint((struct sockaddr*)&ss, 1), sizeof(host));
}
/* Open the PROCps kernel table. */
if ((fp = fopen(_PATH_PROCNET_ARP, "r")) == NULL) {
@@ -575,10 +575,11 @@ static int arp_show(char *name)
if (opt_n)
hostname = "?";
else {
- if (ap->input(0, ip, &sa) < 0)
+ if (ap->input(0, ip, (struct sockaddr*)&ss) < 0)
hostname = ip;
else
- hostname = ap->sprint(&sa, opt_n | 0x8000);
+ hostname = ap->sprint((struct sockaddr*)&ss,
+ opt_n | 0x8000);
if (strcmp(hostname, ip) == 0)
hostname = "?";
}
Index: net-tools.spec
===================================================================
RCS file: /cvs/dist/rpms/net-tools/devel/net-tools.spec,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- net-tools.spec 13 Nov 2006 10:39:32 -0000 1.79
+++ net-tools.spec 27 Dec 2006 08:34:03 -0000 1.80
@@ -70,6 +70,7 @@
Patch56: net-tools-1.60-skip.patch
Patch57: net-tools-1.60-netstat-I-fix.patch
Patch58: net-tools-1.60-nameif_strncpy.patch
+Patch59: net-tools-1.60-arp-unaligned-access.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post,preun): chkconfig
@@ -137,6 +138,7 @@
%patch56 -p1 -b .skip
%patch57 -p1
%patch58 -p1 -b .strncpy
+%patch59 -p1 -b .arp-un-access
cp %SOURCE2 ./config.h
cp %SOURCE3 ./config.make
@@ -248,6 +250,9 @@
%{_sysconfdir}/rc.d/init.d/netplugd
%changelog
+* Wed Dec 27 2006 Radek Vokál <rvokal at redhat.com> - 1.60-76
+- fix arp unaligned access (#220438)
+
* Wed Oct 4 2006 Radek Vokal <rvokal at redhat.com> - 1.60-75
- fix nameif crash for 16char long interface names (#209120)
- Previous message (by thread): rpms/autofs/FC-6 autofs-5.0.1-rc2-disallow-multiple-indirect-mounts-fix.patch, NONE, 1.1 autofs-5.0.1-rc2-fix-nonstrict-multi-mounts.patch, NONE, 1.1 autofs.spec, 1.162, 1.163
- Next message (by thread): rpms/dev86/devel dev86-x86_64.patch,NONE,1.1 dev86.spec,1.19,1.20
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list