This commit is contained in:
parent
694d3e68f6
commit
815ebee2cd
56
iputils-ss021109-ifenslave-strncpy.diff
Normal file
56
iputils-ss021109-ifenslave-strncpy.diff
Normal file
@ -0,0 +1,56 @@
|
||||
--- ifenslave.c 2008-10-06 10:36:26.000000000 +0200
|
||||
+++ ifenslave.c 2008-10-06 10:38:24.000000000 +0200
|
||||
@@ -515,7 +515,7 @@
|
||||
spp++;
|
||||
}
|
||||
|
||||
- if (strncpy(if_ipaddr.ifr_name, slave_ifname, IFNAMSIZ) <= 0
|
||||
+ if (strncpy(if_ipaddr.ifr_name, slave_ifname, IFNAMSIZ) == 0
|
||||
|| ioctl(skfd, SIOCSIFADDR, &if_ipaddr) < 0) {
|
||||
fprintf(stderr,
|
||||
"Something broke setting the slave's address: %s.\n",
|
||||
@@ -528,7 +528,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (strncpy(if_mtu.ifr_name, slave_ifname, IFNAMSIZ) <= 0
|
||||
+ if (strncpy(if_mtu.ifr_name, slave_ifname, IFNAMSIZ) == 0
|
||||
|| ioctl(skfd, SIOCSIFMTU, &if_mtu) < 0) {
|
||||
fprintf(stderr, "Something broke setting the slave MTU: %s.\n",
|
||||
strerror(errno));
|
||||
@@ -537,7 +537,7 @@
|
||||
printf("Set the slave's (%s) MTU to %d.\n", slave_ifname, if_mtu.ifr_mtu);
|
||||
}
|
||||
|
||||
- if (strncpy(if_dstaddr.ifr_name, slave_ifname, IFNAMSIZ) <= 0
|
||||
+ if (strncpy(if_dstaddr.ifr_name, slave_ifname, IFNAMSIZ) == 0
|
||||
|| ioctl(skfd, SIOCSIFDSTADDR, &if_dstaddr) < 0) {
|
||||
fprintf(stderr, "Error setting the slave (%s) with SIOCSIFDSTADDR: %s.\n",
|
||||
slave_ifname, strerror(errno));
|
||||
@@ -549,7 +549,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (strncpy(if_brdaddr.ifr_name, slave_ifname, IFNAMSIZ) <= 0
|
||||
+ if (strncpy(if_brdaddr.ifr_name, slave_ifname, IFNAMSIZ) == 0
|
||||
|| ioctl(skfd, SIOCSIFBRDADDR, &if_brdaddr) < 0) {
|
||||
fprintf(stderr,
|
||||
"Something broke setting the slave (%s) broadcast address: %s.\n",
|
||||
@@ -562,7 +562,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (strncpy(if_netmask.ifr_name, slave_ifname, IFNAMSIZ) <= 0
|
||||
+ if (strncpy(if_netmask.ifr_name, slave_ifname, IFNAMSIZ) == 0
|
||||
|| ioctl(skfd, SIOCSIFNETMASK, &if_netmask) < 0) {
|
||||
fprintf(stderr,
|
||||
"Something broke setting the slave (%s) netmask: %s.\n",
|
||||
@@ -582,7 +582,7 @@
|
||||
*/
|
||||
ifr2.ifr_flags |= IFF_UP;
|
||||
if ((ifr2.ifr_flags &= ~(IFF_SLAVE | IFF_MASTER)) == 0
|
||||
- || strncpy(ifr2.ifr_name, slave_ifname, IFNAMSIZ) <= 0
|
||||
+ || strncpy(ifr2.ifr_name, slave_ifname, IFNAMSIZ) == 0
|
||||
|| ioctl(skfd, SIOCSIFFLAGS, &ifr2) < 0) {
|
||||
fprintf(stderr,
|
||||
"Something broke setting the slave (%s) flags: %s.\n",
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 6 10:47:49 CEST 2008 - ms@suse.de
|
||||
|
||||
- fixed compiler warning in ifenslave.c:
|
||||
*ordered comparison of pointer with integer zero (bnc #431910)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 4 14:40:01 CEST 2008 - ms@suse.de
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
Name: iputils
|
||||
Summary: IPv4and IPv6 Networking Utilities
|
||||
Version: ss021109
|
||||
Release: 285
|
||||
Release: 292
|
||||
License: BSD 3-Clause; GPL v2 or later
|
||||
Group: Productivity/Networking/Other
|
||||
Provides: nkitb
|
||||
@ -47,6 +47,7 @@ Patch15: %name-%version-ping_common.dif
|
||||
Patch16: %name-ss021109-traceroute6-ttab.diff
|
||||
Patch17: %name-%version-open_max.diff
|
||||
Patch18: %name-%version-ping-interrupt.diff
|
||||
Patch19: %name-%version-ifenslave-strncpy.diff
|
||||
Prefix: %_prefix
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@ -81,6 +82,7 @@ Authors:
|
||||
%patch16
|
||||
%patch17 -p1
|
||||
%patch18
|
||||
%patch19
|
||||
mkdir linux
|
||||
touch linux/autoconf.h
|
||||
|
||||
@ -127,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%attr(644,root,root) %_mandir/man8/*
|
||||
|
||||
%changelog
|
||||
* Mon Oct 06 2008 ms@suse.de
|
||||
- fixed compiler warning in ifenslave.c:
|
||||
*ordered comparison of pointer with integer zero (bnc #431910)
|
||||
* Thu Sep 04 2008 ms@suse.de
|
||||
- fixed ping signal handling during address lookup (bnc #416404)
|
||||
* Wed Dec 12 2007 rguenther@suse.de
|
||||
|
Loading…
Reference in New Issue
Block a user