Commit 8a56dfdc authored by Phil Blundell's avatar Phil Blundell

Fix IPv6 compilation problems.

`netstat -c -i' works now (reported by rogerk@tis.com)
Update RPM spec & makefile for new tools.
parent aa47a0f0
...@@ -197,12 +197,16 @@ ipmaddr: $(NET-LIB) ipmaddr.o ...@@ -197,12 +197,16 @@ ipmaddr: $(NET-LIB) ipmaddr.o
installbin: installbin:
install -m 0755 -d ${BASEDIR}/sbin install -m 0755 -d ${BASEDIR}/sbin
install -m 0755 -d ${BASEDIR}/bin install -m 0755 -d ${BASEDIR}/bin
install -m 0755 arp ${BASEDIR}/sbin install -m 0755 arp ${BASEDIR}/sbin
install -m 0755 ifconfig ${BASEDIR}/sbin install -m 0755 ifconfig ${BASEDIR}/sbin
install -m 0755 netstat ${BASEDIR}/bin install -m 0755 netstat ${BASEDIR}/bin
install -m 0755 rarp ${BASEDIR}/sbin install -m 0755 rarp ${BASEDIR}/sbin
install -m 0755 route ${BASEDIR}/sbin install -m 0755 route ${BASEDIR}/sbin
install -m 0755 hostname ${BASEDIR}/bin install -m 0755 hostname ${BASEDIR}/bin
install -m 0755 slattach $(BASEDIR)/sbin
install -m 0755 plipconfig $(BASEDIR)/sbin
install -m 0755 ipmaddr $(BASEDIR)/sbin
install -m 0755 iptunnel $(BASEDIR)/sbin
ln -fs hostname $(BASEDIR)/bin/dnsdomainname ln -fs hostname $(BASEDIR)/bin/dnsdomainname
ln -fs hostname $(BASEDIR)/bin/ypdomainname ln -fs hostname $(BASEDIR)/bin/ypdomainname
ln -fs hostname $(BASEDIR)/bin/nisdomainname ln -fs hostname $(BASEDIR)/bin/nisdomainname
......
Summary: Basic Networking Tools Summary: Basic Networking Tools
Name: net-tools Name: net-tools
Version: 1.49 Version: 1.50
Release: 1 Release: 1
Copyright: GPL Copyright: GPL
Group: Networking/Admin Group: Networking/Admin
...@@ -11,7 +11,7 @@ BuildRoot: /var/tmp/%{name}-root ...@@ -11,7 +11,7 @@ BuildRoot: /var/tmp/%{name}-root
%description %description
This is a collection of the basic tools necessary for setting up networking This is a collection of the basic tools necessary for setting up networking
on a Linux machine. It includes ifconfig, route, netstat, rarp, and on a Linux machine. It includes ifconfig, route, netstat, rarp, and
some other minor tools. various other tools.
%prep %prep
%setup -q %setup -q
...@@ -31,7 +31,7 @@ mkdir -p $RPM_BUILD_ROOT/usr/man/man8 ...@@ -31,7 +31,7 @@ mkdir -p $RPM_BUILD_ROOT/usr/man/man8
make BASEDIR=$RPM_BUILD_ROOT install make BASEDIR=$RPM_BUILD_ROOT install
( cd $RPM_BUILD_ROOT/sbin ( cd $RPM_BUILD_ROOT/sbin
strip arp ifconfig rarp route strip arp ifconfig rarp route slattach plipconfig ipmaddr iptunnel
cd ../bin cd ../bin
strip hostname netstat strip hostname netstat
) )
...@@ -45,6 +45,10 @@ rm -rf $RPM_BUILD_ROOT ...@@ -45,6 +45,10 @@ rm -rf $RPM_BUILD_ROOT
/sbin/ifconfig /sbin/ifconfig
/sbin/rarp /sbin/rarp
/sbin/route /sbin/route
/sbin/slattach
/sbin/plipconfig
/sbin/ipmaddr
/sbin/iptunnel
/bin/domainname /bin/domainname
/bin/dnsdomainname /bin/dnsdomainname
/bin/hostname /bin/hostname
...@@ -57,6 +61,10 @@ rm -rf $RPM_BUILD_ROOT ...@@ -57,6 +61,10 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/locale/*/LC_MESSAGES/net-tools.mo /usr/share/locale/*/LC_MESSAGES/net-tools.mo
%changelog %changelog
* Sun Jan 10 1999 Phil Blundell <philb@gnu.org>
- update to 1.50
- add new stuff to %files and strip it in %install
* Thu Nov 26 1998 Phil Blundell <pb@nexus.co.uk> * Thu Nov 26 1998 Phil Blundell <pb@nexus.co.uk>
- update to 1.48. - update to 1.48.
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <arpa/nameser.h> #include <arpa/nameser.h>
/* #include <net/route.h> realy broken */
#include <net/if.h> #include <net/if.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <ctype.h> #include <ctype.h>
...@@ -24,7 +23,9 @@ ...@@ -24,7 +23,9 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#ifndef __GLIBC__ #ifdef __GLIBC__
#include <net/route.h>
#else
#include <netinet6/ipv6_route.h> /* glibc does not have this */ #include <netinet6/ipv6_route.h> /* glibc does not have this */
#endif #endif
#include "version.h" #include "version.h"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <netdb.h> #include <netdb.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <resolv.h> #include <resolv.h>
#include <asm/types.h>
#include <linux/pkt_sched.h> #include <linux/pkt_sched.h>
#include "utils.h" #include "utils.h"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* NET-3 Networking Distribution for the LINUX operating * NET-3 Networking Distribution for the LINUX operating
* system. * system.
* *
* Version: $Id: netstat.c,v 1.16 1999/01/05 20:53:00 philip Exp $ * Version: $Id: netstat.c,v 1.17 1999/01/10 18:05:06 philip Exp $
* *
* Authors: Fred Baumgarten, <dc6iq@insu1.etec.uni-karlsruhe.de> * Authors: Fred Baumgarten, <dc6iq@insu1.etec.uni-karlsruhe.de>
* Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
...@@ -494,7 +494,7 @@ static void udp_do_one(int lnr, const char *line) ...@@ -494,7 +494,7 @@ static void udp_do_one(int lnr, const char *line)
} }
#if HAVE_AFINET6 #if HAVE_AFINET6
#define notnull(A) ((A.sin6_family == AF_INET6) && \ #define notnull(A) (((A.sin6_family == AF_INET6) && \
((A.sin6_addr.s6_addr32[0]) || \ ((A.sin6_addr.s6_addr32[0]) || \
(A.sin6_addr.s6_addr32[1]) || \ (A.sin6_addr.s6_addr32[1]) || \
(A.sin6_addr.s6_addr32[2]) || \ (A.sin6_addr.s6_addr32[2]) || \
...@@ -1088,7 +1088,8 @@ static int iface_info(void) ...@@ -1088,7 +1088,8 @@ static int iface_info(void)
perror(_("missing interface information")); perror(_("missing interface information"));
exit(1); exit(1);
} }
close(skfd); if (!flag_cnt)
close(skfd);
skfd = -1; skfd = -1;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment