OBS User unknown 2008-10-27 16:03:18 +00:00 committed by Git OBS Bridge
parent a6feccae6a
commit b4aedef7ed
3 changed files with 54 additions and 2 deletions

View File

@ -0,0 +1,41 @@
--- net-tools-1.60/ifconfig.c.orig 2008-10-22 19:27:21.000000000 +0530
+++ net-tools-1.60/ifconfig.c 2008-10-22 19:31:08.000000000 +0530
@@ -227,7 +227,7 @@ static int set_netmask(int skfd, struct
int main(int argc, char **argv)
{
- struct sockaddr sa;
+ struct sockaddr sa, sa_netmask;
struct sockaddr_in sin;
char host[128];
struct aftype *ap;
@@ -903,16 +903,13 @@ int main(int argc, char **argv)
/* 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;
case 1:
if (didnetmask)
usage();
-
- goterr = set_netmask(skfd, &ifr, &sa);
- didnetmask++;
break;
}
}
@@ -960,6 +957,11 @@ int main(int argc, char **argv)
}
}
+ if (!didnetmask) {
+ 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 @@
-------------------------------------------------------------------
Mon Oct 27 15:33:44 CET 2008 - ms@suse.de
- fixed ifconfig SIOCSIFNETMASK ioctl from being called earlier
to SIOCSIFADDR (bnc #438983)
-------------------------------------------------------------------
Thu Sep 25 17:12:33 CEST 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: 721
Release: 722
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
* Mon Oct 27 2008 ms@suse.de
- fixed ifconfig SIOCSIFNETMASK ioctl from being called earlier
to SIOCSIFADDR (bnc #438983)
* Thu Sep 25 2008 ms@suse.de
- really fixed netstat -ci, incomplete patch (bnc #424813)
* Wed Sep 10 2008 ms@suse.de
@ -186,7 +191,7 @@ rm -rf $RPM_BUILD_ROOT
- fixed length of interface field (bnc #367769)
* Tue Mar 04 2008 ms@suse.de
- added obsolete warning for ifconfig into man page (bnc #366477)
* Mon Feb 25 2008 crrodriguez@suse.de
* Sun Feb 24 2008 crrodriguez@suse.de
- use find_lang macro
* Wed Jul 25 2007 ms@suse.de
- fixed locale names (#294148)