OBS User unknown 2008-11-06 21:19:51 +00:00 committed by Git OBS Bridge
parent 445084ed7b
commit 7718620251
3 changed files with 67 additions and 4 deletions

View File

@ -0,0 +1,52 @@
--- net-tools-1.60/ifconfig.c.orig 2008-11-06 16:25:50.000000000 +0100
+++ net-tools-1.60/ifconfig.c 2008-11-06 16:36:10.000000000 +0100
@@ -227,13 +227,13 @@
int main(int argc, char **argv)
{
- struct sockaddr sa;
+ struct sockaddr sa, sa_netmask;
struct sockaddr_in sin;
char host[128];
struct aftype *ap;
struct hwtype *hw;
struct ifreq ifr;
- int goterr = 0, didnetmask = 0;
+ int goterr = 0, didnetmask = 0, donetmask = 0;
char **spp;
int fd;
#if HAVE_AFINET6
@@ -903,7 +903,7 @@
/* FIXME: sa is too small for INET6 addresses, inet6 should use that too,
broadcast is unexpected */
if (ap->getmask) {
- switch (ap->getmask(host, &sa, NULL)) {
+ switch (ap->getmask(host, &sa_netmask, NULL)) {
case -1:
usage();
break;
@@ -911,8 +911,8 @@
if (didnetmask)
usage();
- goterr = set_netmask(skfd, &ifr, &sa);
- didnetmask++;
+ /* delay setting the CIDR netmask till after setting the addr */
+ donetmask = 1;
break;
}
}
@@ -960,6 +960,13 @@
}
}
+ /* set CIDR netmask */
+ if (donetmask) {
+ donetmask = 0;
+ goterr = set_netmask(skfd, &ifr, &sa_netmask);
+ didnetmask++;
+ }
+
/*
* Don't do the set_flag() if the address is an alias with a - at the
* end, since it's deleted already! - Roman

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Nov 6 16:06:51 CET 2008 - ms@suse.de
- really fixed SIOCSIFNETMASK ioctl from being called earlier
to SIOCSIFADDR (bnc #438983)
-------------------------------------------------------------------
Fri Oct 31 16:20:54 CET 2008 - ms@suse.de

View File

@ -28,7 +28,7 @@ Provides: iputils:/usr/share/man/man8/traceroute6.1.gz
Obsoletes: traceroute net_tool
AutoReqProv: on
Version: 1.60
Release: 723
Release: 724
Summary: Important Programs for Networking
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: net-tools-%{version}.tar.bz2
@ -65,6 +65,7 @@ Patch28: traceroute-strip.diff
Patch30: net-tools-1.60-ifconfig.8.diff
Patch31: net-tools-1.60-tcp-recvq-listen.patch
Patch32: net-tools-1.60-netstat-ci.diff
Patch33: net-tools-1.60-ifconfig-SIOCSIFNETMASK.diff
%description
This package contains essential programs for network administration and
@ -115,6 +116,7 @@ cd ..
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%build
make config
@ -168,6 +170,9 @@ rm -rf $RPM_BUILD_ROOT
%lang(pt_BR) %doc %_mandir/pt_BR/man*/*
%changelog
* Thu Nov 06 2008 ms@suse.de
- really fixed SIOCSIFNETMASK ioctl from being called earlier
to SIOCSIFADDR (bnc #438983)
* Fri Oct 31 2008 ms@suse.de
- reverted last patch from IBM because it breaks standard
ifconfig usage as shown in bug (bnc #440580)
@ -287,7 +292,7 @@ rm -rf $RPM_BUILD_ROOT
- added non-en manpage directories to filelist
* Mon May 19 2003 mmj@suse.de
- Use a better and more tested nstrcmp.c [#26950]
* Wed May 14 2003 ro@suse.de
* Tue May 13 2003 ro@suse.de
- fix build with 2.5 kernel includes
* Tue May 13 2003 mmj@suse.de
- Package man-pages in several languages
@ -329,7 +334,7 @@ rm -rf $RPM_BUILD_ROOT
- spec file changes to make use of wildcards in the filelist
* Fri Oct 20 2000 kukuk@suse.de
- Rename from net_tool to net-tools
* Mon Jun 26 2000 bk@suse.de
* Sun Jun 25 2000 bk@suse.de
- s390: removed not needed files
* Sat Jun 03 2000 kukuk@suse.de
- Update to 1.56
@ -355,7 +360,7 @@ rm -rf $RPM_BUILD_ROOT
- Update to 1.53, remove ypdomainname and nisdomainname
* Sat Jun 26 1999 kukuk@suse.de
- update from jurix to 1.52
* Wed Mar 10 1999 ro@suse.de
* Tue Mar 09 1999 ro@suse.de
- update to 1.50
- included slattach and its manpage in filelist
* Wed Oct 28 1998 ro@suse.de