update to 1.60.20130916git [release 1.60.20130916git-1mamba;Mon Sep 16 2013]
This commit is contained in:
parent
e4602973ae
commit
ab55b04cde
@ -1,2 +1,4 @@
|
|||||||
# net-tools
|
# net-tools
|
||||||
|
|
||||||
|
The net-tools package contains the basic tools needed for setting up networking: ifconfig, netstat, route and others.
|
||||||
|
|
||||||
|
58
net-tools-1.60-arp-1.patch
Normal file
58
net-tools-1.60-arp-1.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
Submitted By: Jim Gifford (patches at jg555 dot com)
|
||||||
|
Date: 2003-09-12
|
||||||
|
Initial Package Version: 1.60
|
||||||
|
Origin: Rawhide
|
||||||
|
Description: Allows ARP to display in a Linux Style
|
||||||
|
|
||||||
|
diff -Naur net-tools-1.60.orig/arp.c net-tools-1.60/arp.c
|
||||||
|
--- net-tools-1.60.orig/arp.c 2001-04-08 17:05:05.000000000 +0000
|
||||||
|
+++ net-tools-1.60/arp.c 2003-09-12 22:36:51.000000000 +0000
|
||||||
|
@@ -619,6 +619,7 @@
|
||||||
|
fprintf(stderr, _(" arp [-v] [<HW>] [-i <if>] -Ds <hostname> <if> [netmask <nm>] pub <-''-\n\n"));
|
||||||
|
|
||||||
|
fprintf(stderr, _(" -a display (all) hosts in alternative (BSD) style\n"));
|
||||||
|
+ fprintf(stderr, _(" -e display (all) hosts in default (Linux) style\n"));
|
||||||
|
fprintf(stderr, _(" -s, --set set a new ARP entry\n"));
|
||||||
|
fprintf(stderr, _(" -d, --delete delete a specified entry\n"));
|
||||||
|
fprintf(stderr, _(" -v, --verbose be verbose\n"));
|
||||||
|
diff -Naur net-tools-1.60.orig/man/en_US/arp.8 net-tools-1.60/man/en_US/arp.8
|
||||||
|
--- net-tools-1.60.orig/man/en_US/arp.8 2000-10-28 10:59:42.000000000 +0000
|
||||||
|
+++ net-tools-1.60/man/en_US/arp.8 2003-09-12 22:36:51.000000000 +0000
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
arp \- manipulate the system ARP cache
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B arp
|
||||||
|
-.RB [ \-vn ]
|
||||||
|
+.RB [ \-evn ]
|
||||||
|
.RB [ "\-H type" ]
|
||||||
|
.RB [ "-i if" ]
|
||||||
|
.B -a
|
||||||
|
@@ -60,7 +60,7 @@
|
||||||
|
shows numerical addresses instead of trying to determine symbolic host, port
|
||||||
|
or user names.
|
||||||
|
.TP
|
||||||
|
-.B "\-H type, \-\-hw-type type"
|
||||||
|
+.B "\-H type, \-\-hw-type type, \-t type"
|
||||||
|
When setting or reading the ARP cache, this optional parameter tells
|
||||||
|
.B arp
|
||||||
|
which class of entries it should check for. The default value of
|
||||||
|
@@ -81,7 +81,8 @@
|
||||||
|
.B hostname
|
||||||
|
parameter is not used,
|
||||||
|
.B all
|
||||||
|
-entries will be displayed.
|
||||||
|
+entries will be displayed.
|
||||||
|
+The entries will be displayed in alternate (BSD) style.
|
||||||
|
.TP
|
||||||
|
.B "\-d hostname, \-\-delete hostname"
|
||||||
|
Remove any entry for the specified host. This can be used if the
|
||||||
|
@@ -92,6 +93,9 @@
|
||||||
|
.BR ifa "'s"
|
||||||
|
hardware address.
|
||||||
|
.TP
|
||||||
|
+.B "\-e"
|
||||||
|
+Shows the entries in default (Linux) style.
|
||||||
|
+.TP
|
||||||
|
.B "\-i If, \-\-device If"
|
||||||
|
Select an interface. When dumping the ARP cache only entries matching
|
||||||
|
the specified interface will be printed. When setting a permanent or
|
9
net-tools-1.60-envpath.patch
Normal file
9
net-tools-1.60-envpath.patch
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
diff -Nru net-tools-1.60.orig/configure.sh net-tools-1.60/configure.sh
|
||||||
|
--- net-tools-1.60.orig/configure.sh 2005-09-13 18:12:34.000000000 +0200
|
||||||
|
+++ net-tools-1.60/configure.sh 2005-09-13 18:12:42.000000000 +0200
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env bash
|
||||||
|
+#!/bin/env bash
|
||||||
|
#
|
||||||
|
# Configure.sh Generates interactively a config.h from config.in
|
||||||
|
#
|
42
net-tools-1.60-gcc4.patch
Normal file
42
net-tools-1.60-gcc4.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
diff -ru net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c
|
||||||
|
--- net-tools-1.60.orig/hostname.c 2005-09-13 18:20:15.000000000 +0200
|
||||||
|
+++ net-tools-1.60/hostname.c 2005-09-13 18:22:35.000000000 +0200
|
||||||
|
@@ -97,7 +97,7 @@
|
||||||
|
case EINVAL:
|
||||||
|
fprintf(stderr, _("%s: name too long\n"), program_name);
|
||||||
|
break;
|
||||||
|
- default:
|
||||||
|
+ default: ;
|
||||||
|
}
|
||||||
|
exit(1);
|
||||||
|
};
|
||||||
|
@@ -116,7 +116,7 @@
|
||||||
|
case EINVAL:
|
||||||
|
fprintf(stderr, _("%s: name too long\n"), program_name);
|
||||||
|
break;
|
||||||
|
- default:
|
||||||
|
+ default: ;
|
||||||
|
}
|
||||||
|
exit(1);
|
||||||
|
};
|
||||||
|
@@ -173,7 +173,7 @@
|
||||||
|
*p = '\0';
|
||||||
|
printf("%s\n", hp->h_name);
|
||||||
|
break;
|
||||||
|
- default:
|
||||||
|
+ default: ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
diff -ru net-tools-1.60.orig/lib/inet_sr.c net-tools-1.60/lib/inet_sr.c
|
||||||
|
--- net-tools-1.60.orig/lib/inet_sr.c 2005-09-13 18:20:15.000000000 +0200
|
||||||
|
+++ net-tools-1.60/lib/inet_sr.c 2005-09-13 18:21:20.000000000 +0200
|
||||||
|
@@ -104,7 +104,7 @@
|
||||||
|
isnet = 1; break;
|
||||||
|
case 2:
|
||||||
|
isnet = 0; break;
|
||||||
|
- default:
|
||||||
|
+ default: ;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fill in the other fields. */
|
90
net-tools-1.60-ipv6-1.patch
Normal file
90
net-tools-1.60-ipv6-1.patch
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
Submitted By: Jim Gifford (patches at jg555 dot com)
|
||||||
|
Date: 2003-09-12
|
||||||
|
Initial Package Version: 1.60
|
||||||
|
Origin: Rawhide
|
||||||
|
Description: Fixes IPV6 Lookup
|
||||||
|
|
||||||
|
diff -Naur net-tools-1.60.orig/lib/inet6.c net-tools-1.60/lib/inet6.c
|
||||||
|
--- net-tools-1.60.orig/lib/inet6.c 2000-10-28 11:04:00.000000000 +0000
|
||||||
|
+++ net-tools-1.60/lib/inet6.c 2003-09-12 22:40:45.000000000 +0000
|
||||||
|
@@ -133,28 +133,9 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-static int INET6_getsock(char *bufp, struct sockaddr *sap)
|
||||||
|
-{
|
||||||
|
- struct sockaddr_in6 *sin6;
|
||||||
|
-
|
||||||
|
- sin6 = (struct sockaddr_in6 *) sap;
|
||||||
|
- sin6->sin6_family = AF_INET6;
|
||||||
|
- sin6->sin6_port = 0;
|
||||||
|
-
|
||||||
|
- if (inet_pton(AF_INET6, bufp, sin6->sin6_addr.s6_addr) <= 0)
|
||||||
|
- return (-1);
|
||||||
|
-
|
||||||
|
- return 16; /* ?;) */
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static int INET6_input(int type, char *bufp, struct sockaddr *sap)
|
||||||
|
{
|
||||||
|
- switch (type) {
|
||||||
|
- case 1:
|
||||||
|
- return (INET6_getsock(bufp, sap));
|
||||||
|
- default:
|
||||||
|
- return (INET6_resolve(bufp, (struct sockaddr_in6 *) sap));
|
||||||
|
- }
|
||||||
|
+ return (INET6_resolve(bufp, (struct sockaddr_in6 *) sap));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
diff -Naur net-tools-1.60.orig/lib/inet6_gr.c net-tools-1.60/lib/inet6_gr.c
|
||||||
|
--- net-tools-1.60.orig/lib/inet6_gr.c 2001-04-01 14:48:06.000000000 +0000
|
||||||
|
+++ net-tools-1.60/lib/inet6_gr.c 2003-09-12 22:40:45.000000000 +0000
|
||||||
|
@@ -100,7 +100,7 @@
|
||||||
|
addr6p[4], addr6p[5], addr6p[6], addr6p[7]);
|
||||||
|
inet6_aftype.input(1, addr6, (struct sockaddr *) &saddr6);
|
||||||
|
snprintf(addr6, sizeof(addr6), "%s/%d",
|
||||||
|
- inet6_aftype.sprint((struct sockaddr *) &saddr6, 1),
|
||||||
|
+ inet6_aftype.sprint((struct sockaddr *) &saddr6, numeric),
|
||||||
|
prefix_len);
|
||||||
|
|
||||||
|
/* Fetch and resolve the nexthop address. */
|
||||||
|
@@ -109,7 +109,7 @@
|
||||||
|
naddr6p[4], naddr6p[5], naddr6p[6], naddr6p[7]);
|
||||||
|
inet6_aftype.input(1, naddr6, (struct sockaddr *) &snaddr6);
|
||||||
|
snprintf(naddr6, sizeof(naddr6), "%s",
|
||||||
|
- inet6_aftype.sprint((struct sockaddr *) &snaddr6, 1));
|
||||||
|
+ inet6_aftype.sprint((struct sockaddr *) &snaddr6, numeric));
|
||||||
|
|
||||||
|
/* Decode the flags. */
|
||||||
|
strcpy(flags, "U");
|
||||||
|
diff -Naur net-tools-1.60.orig/lib/inet6_sr.c net-tools-1.60/lib/inet6_sr.c
|
||||||
|
--- net-tools-1.60.orig/lib/inet6_sr.c 2000-05-22 21:18:37.000000000 +0000
|
||||||
|
+++ net-tools-1.60/lib/inet6_sr.c 2003-09-12 22:40:45.000000000 +0000
|
||||||
|
@@ -63,7 +63,7 @@
|
||||||
|
if (*args == NULL)
|
||||||
|
return (usage());
|
||||||
|
|
||||||
|
- strcpy(target, *args++);
|
||||||
|
+ safe_strncpy(target, *args++, sizeof(target));
|
||||||
|
if (!strcmp(target, "default")) {
|
||||||
|
prefix_len = 0;
|
||||||
|
memset(&sa6, 0, sizeof(sa6));
|
||||||
|
@@ -112,7 +112,7 @@
|
||||||
|
return (usage());
|
||||||
|
if (rt.rtmsg_flags & RTF_GATEWAY)
|
||||||
|
return (usage());
|
||||||
|
- strcpy(gateway, *args);
|
||||||
|
+ safe_strncpy(gateway, *args, sizeof(gateway));
|
||||||
|
if (inet6_aftype.input(1, gateway,
|
||||||
|
(struct sockaddr *) &sa6) < 0) {
|
||||||
|
inet6_aftype.herror(gateway);
|
||||||
|
@@ -152,7 +152,7 @@
|
||||||
|
}
|
||||||
|
if (devname) {
|
||||||
|
memset(&ifr, 0, sizeof(ifr));
|
||||||
|
- strcpy(ifr.ifr_name, devname);
|
||||||
|
+ safe_strncpy(ifr.ifr_name, devname, sizeof(ifr.ifr_name));
|
||||||
|
|
||||||
|
if (ioctl(skfd, SIOGIFINDEX, &ifr) < 0) {
|
||||||
|
perror("SIOGIFINDEX");
|
11
net-tools-1.60-kernel2.6.29.patch
Normal file
11
net-tools-1.60-kernel2.6.29.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -Nru net-tools-1.60.orig/iptunnel.c net-tools-1.60/iptunnel.c
|
||||||
|
--- net-tools-1.60.orig/iptunnel.c 2010-02-17 13:11:51.000000000 +0100
|
||||||
|
+++ net-tools-1.60/iptunnel.c 2010-02-17 13:12:04.000000000 +0100
|
||||||
|
@@ -29,6 +29,7 @@
|
||||||
|
#include <linux/if.h>
|
||||||
|
#include <linux/if_arp.h>
|
||||||
|
#include <linux/types.h>
|
||||||
|
+#include <linux/ip.h>
|
||||||
|
#include <linux/if_tunnel.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
70
net-tools-1.60-kernel_headers-3.patch
Normal file
70
net-tools-1.60-kernel_headers-3.patch
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
|
||||||
|
Date: 2005-04-24
|
||||||
|
Initial Package Version: 2.6
|
||||||
|
Origin: Gentoo and Self
|
||||||
|
Upstream Status: N/A
|
||||||
|
Description: Fixes Compile Issues with the 2.6 Kernel
|
||||||
|
|
||||||
|
diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c
|
||||||
|
--- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000
|
||||||
|
+++ net-tools-1.60/hostname.c 2004-06-24 06:17:32.517305695 +0000
|
||||||
|
@@ -42,10 +42,16 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include "version.h"
|
||||||
|
#include "../intl.h"
|
||||||
|
+#include <linux/version.h>
|
||||||
|
|
||||||
|
#if HAVE_AFDECnet
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
|
||||||
|
#include <netdnet/dn.h>
|
||||||
|
#endif
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
|
||||||
|
+#include <linux/dn.h>
|
||||||
|
+#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)";
|
||||||
|
|
||||||
|
diff -Naur net-tools-1.60.orig/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c
|
||||||
|
--- net-tools-1.60.orig/lib/x25_sr.c 2000-05-20 13:38:10.000000000 +0000
|
||||||
|
+++ net-tools-1.60/lib/x25_sr.c 2004-06-24 06:15:45.163773724 +0000
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <linux/x25.h>
|
||||||
|
+#include <linux/version.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
@@ -77,7 +78,11 @@
|
||||||
|
rt.sigdigits=sigdigits;
|
||||||
|
|
||||||
|
/* x25_route_struct.address isn't type struct sockaddr_x25, Why? */
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
|
||||||
|
memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address));
|
||||||
|
+#else
|
||||||
|
+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address));
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
while (*args) {
|
||||||
|
if (!strcmp(*args,"device") || !strcmp(*args,"dev")) {
|
||||||
|
diff -Naur net-tools-1.60.orig/iptunnel.c net-tools-1.60/iptunnel.c
|
||||||
|
--- net-tools-1.60.orig/iptunnel.c 2001-04-08 10:04:23.000000000 -0700
|
||||||
|
+++ net-tools-1.60/iptunnel.c 2006-04-25 01:29:12.416147208 -0700
|
||||||
|
@@ -25,16 +25,9 @@
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
-#include <netinet/in.h>
|
||||||
|
-#include <netinet/ip.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
-#if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
|
||||||
|
-#include <net/if.h>
|
||||||
|
-#include <net/if_arp.h>
|
||||||
|
-#else
|
||||||
|
#include <linux/if.h>
|
||||||
|
#include <linux/if_arp.h>
|
||||||
|
-#endif
|
||||||
|
#include <linux/types.h>
|
||||||
|
#include <linux/if_tunnel.h>
|
||||||
|
|
38
net-tools-1.60-miitool-gcc33-1.patch
Normal file
38
net-tools-1.60-miitool-gcc33-1.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
Submitted By: Ronald Hummelink <ronald at hummelink dot xs4all dot nl>
|
||||||
|
Date: 2003-08-24
|
||||||
|
Initial Package Version: 1.60
|
||||||
|
Origin: Ronald Hummelink
|
||||||
|
Description: mii-tool.c doesn't compile using gcc 3.3.1 and probably any gcc 3.3.x. This patch fixes a string block to a syntax gcc 3.3 likes.
|
||||||
|
|
||||||
|
diff -Naur net-tools-1.60.orig/mii-tool.c net-tools-1.60/mii-tool.c
|
||||||
|
--- net-tools-1.60.orig/mii-tool.c 2000-05-21 14:31:17.000000000 +0000
|
||||||
|
+++ net-tools-1.60/mii-tool.c 2003-08-24 20:04:38.000000000 +0000
|
||||||
|
@@ -379,17 +379,17 @@
|
||||||
|
/*--------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
const char *usage =
|
||||||
|
-"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]
|
||||||
|
- -V, --version display version information
|
||||||
|
- -v, --verbose more verbose output
|
||||||
|
- -R, --reset reset MII to poweron state
|
||||||
|
- -r, --restart restart autonegotiation
|
||||||
|
- -w, --watch monitor for link status changes
|
||||||
|
- -l, --log with -w, write events to syslog
|
||||||
|
- -A, --advertise=media,... advertise only specified media
|
||||||
|
- -F, --force=media force specified media technology
|
||||||
|
-media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
|
||||||
|
- (to advertise both HD and FD) 100baseTx, 10baseT\n";
|
||||||
|
+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n"
|
||||||
|
+" -V, --version display version information\n"
|
||||||
|
+" -v, --verbose more verbose output\n"
|
||||||
|
+" -R, --reset reset MII to poweron state\n"
|
||||||
|
+" -r, --restart restart autonegotiation\n"
|
||||||
|
+" -w, --watch monitor for link status changes\n"
|
||||||
|
+" -l, --log with -w, write events to syslog\n"
|
||||||
|
+" -A, --advertise=media,... advertise only specified media\n"
|
||||||
|
+" -F, --force=media force specified media technology\n"
|
||||||
|
+"media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n"
|
||||||
|
+" (to advertise both HD and FD) 100baseTx, 10baseT\n";
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
67
net-tools-1.60-nameif-2.patch
Normal file
67
net-tools-1.60-nameif-2.patch
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
Submitted By: Jim Gifford (patches at jg555 dot com)
|
||||||
|
Date: 2003-09-12
|
||||||
|
Initial Package Version: 1.60
|
||||||
|
Origin: Rawhide
|
||||||
|
Description: Sometimes the wrong device information is shown
|
||||||
|
It would show the previous interfaces information
|
||||||
|
This patch corrects this issue
|
||||||
|
|
||||||
|
diff -Naur net-tools-1.60.orig/nameif.c net-tools-1.60/nameif.c
|
||||||
|
--- net-tools-1.60.orig/nameif.c 2000-10-18 17:26:29.000000000 +0000
|
||||||
|
+++ net-tools-1.60/nameif.c 2003-09-12 22:48:57.000000000 +0000
|
||||||
|
@@ -117,7 +117,8 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
struct change {
|
||||||
|
- struct change *next,**pprev;
|
||||||
|
+ struct change *next;
|
||||||
|
+ int found;
|
||||||
|
char ifname[IFNAMSIZ+1];
|
||||||
|
unsigned char mac[6];
|
||||||
|
};
|
||||||
|
@@ -139,10 +140,7 @@
|
||||||
|
ch->ifname, pos);
|
||||||
|
if (parsemac(p,ch->mac) < 0)
|
||||||
|
complain(_("cannot parse MAC `%s' at %s"), p, pos);
|
||||||
|
- if (clist)
|
||||||
|
- clist->pprev = &ch->next;
|
||||||
|
ch->next = clist;
|
||||||
|
- ch->pprev = &clist;
|
||||||
|
clist = ch;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -200,7 +198,7 @@
|
||||||
|
|
||||||
|
void usage(void)
|
||||||
|
{
|
||||||
|
- fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}"));
|
||||||
|
+ fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}\n"));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -277,21 +275,21 @@
|
||||||
|
ch = lookupmac(mac);
|
||||||
|
if (!ch)
|
||||||
|
continue;
|
||||||
|
-
|
||||||
|
- *ch->pprev = ch->next;
|
||||||
|
+
|
||||||
|
+ ch->found = 1;
|
||||||
|
if (strcmp(p, ch->ifname)) {
|
||||||
|
if (setname(p, ch->ifname) < 0)
|
||||||
|
complain(_("cannot change name of %s to %s: %s"),
|
||||||
|
p, ch->ifname, strerror(errno));
|
||||||
|
}
|
||||||
|
- free(ch);
|
||||||
|
}
|
||||||
|
fclose(ifh);
|
||||||
|
|
||||||
|
while (clist) {
|
||||||
|
struct change *ch = clist;
|
||||||
|
clist = clist->next;
|
||||||
|
- warning(_("interface '%s' not found"), ch->ifname);
|
||||||
|
+ if (!ch->found)
|
||||||
|
+ warning(_("interface '%s' not found"), ch->ifname);
|
||||||
|
free(ch);
|
||||||
|
}
|
||||||
|
|
30
net-tools-1.60-virtualname-1.patch
Normal file
30
net-tools-1.60-virtualname-1.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
Submitted By: Jim Gifford (patches at jg555 dot com)
|
||||||
|
Date: 2003-09-12
|
||||||
|
Initial Package Version: 1.60
|
||||||
|
Origin: Rawhide
|
||||||
|
Description: Show Virtual Name in netstat
|
||||||
|
|
||||||
|
diff -Naur net-tools-1.60.orig/lib/interface.c net-tools-1.60/lib/interface.c
|
||||||
|
--- net-tools-1.60.orig/lib/interface.c 2001-02-10 19:31:15.000000000 +0000
|
||||||
|
+++ net-tools-1.60/lib/interface.c 2003-09-12 22:50:35.000000000 +0000
|
||||||
|
@@ -579,7 +579,7 @@
|
||||||
|
|
||||||
|
void ife_print_short(struct interface *ptr)
|
||||||
|
{
|
||||||
|
- printf("%-5.5s ", ptr->name);
|
||||||
|
+ printf("%-9.8s ", ptr->name);
|
||||||
|
printf("%5d %3d", ptr->mtu, ptr->metric);
|
||||||
|
/* If needed, display the interface statistics. */
|
||||||
|
if (ptr->statistics_valid) {
|
||||||
|
diff -Naur net-tools-1.60.orig/netstat.c net-tools-1.60/netstat.c
|
||||||
|
--- net-tools-1.60.orig/netstat.c 2003-09-12 22:43:54.000000000 +0000
|
||||||
|
+++ net-tools-1.60/netstat.c 2003-09-12 22:50:35.000000000 +0000
|
||||||
|
@@ -1449,7 +1449,7 @@
|
||||||
|
}
|
||||||
|
if (flag_exp < 2) {
|
||||||
|
ife_short = 1;
|
||||||
|
- printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
|
||||||
|
+ printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (for_all_interfaces(do_if_print, &flag_all) < 0) {
|
95
net-tools-1.60.20130916git-config.in
Normal file
95
net-tools-1.60.20130916git-config.in
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
#
|
||||||
|
# config.in configure.sh source for the net-tools.
|
||||||
|
# This file contains the definition of what the support
|
||||||
|
# library contains. Most of all, it defines which types
|
||||||
|
# of address families and hardware we know of.
|
||||||
|
#
|
||||||
|
# NET-TOOLS A collection of programs that form the base set of the
|
||||||
|
# NET-3 Networking Distribution for the LINUX operating
|
||||||
|
# system.
|
||||||
|
#
|
||||||
|
# Version: config.in 1.22 (99-04-19)
|
||||||
|
#
|
||||||
|
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
|
||||||
|
# Copyright 1988-1993 MicroWalt Corporation
|
||||||
|
#
|
||||||
|
# Bernd 'eckes' Eckenfels <net-tools@lina.inka.de>
|
||||||
|
# Arnaldo Carvalho de Melo <acme@conectiva.com.br>
|
||||||
|
# GNU gettext - I18N
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it
|
||||||
|
# and/or modify it under the terms of the GNU General
|
||||||
|
# Public License as published by the Free Software
|
||||||
|
# Foundation; either version 2 of the License, or (at
|
||||||
|
# your option) any later version.
|
||||||
|
#
|
||||||
|
= /*
|
||||||
|
= * config.h Automatically generated configuration includefile
|
||||||
|
= *
|
||||||
|
= * NET-TOOLS A collection of programs that form the base set of the
|
||||||
|
= * NET-3 Networking Distribution for the LINUX operating
|
||||||
|
= * system.
|
||||||
|
= *
|
||||||
|
= * DO NOT EDIT DIRECTLY
|
||||||
|
= *
|
||||||
|
= */
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Internationalization
|
||||||
|
*
|
||||||
|
* The net-tools package has currently been translated to French,
|
||||||
|
* German and Brazilian Portugese. Other translations are, of
|
||||||
|
* course, welcome. Answer `n' here if you have no support for
|
||||||
|
* internationalization on your system.
|
||||||
|
*
|
||||||
|
bool 'Does your system support GNU gettext?' I18N n
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Protocol Families.
|
||||||
|
*
|
||||||
|
bool 'UNIX protocol family' HAVE_AFUNIX y
|
||||||
|
bool 'INET (TCP/IP) protocol family' HAVE_AFINET y
|
||||||
|
bool 'INET6 (IPv6) protocol family' HAVE_AFINET6 y
|
||||||
|
bool 'Novell IPX/SPX protocol family' HAVE_AFIPX y
|
||||||
|
bool 'Appletalk DDP protocol family' HAVE_AFATALK y
|
||||||
|
bool 'AX25 (packet radio) protocol family' HAVE_AFAX25 y
|
||||||
|
bool 'NET/ROM (packet radio) protocol family' HAVE_AFNETROM y
|
||||||
|
bool 'Rose (packet radio) protocol family' HAVE_AFROSE y
|
||||||
|
bool 'X.25 (CCITT) protocol family' HAVE_AFX25 y
|
||||||
|
bool 'Econet protocol family' HAVE_AFECONET y
|
||||||
|
bool 'DECnet protocol family' HAVE_AFDECnet n
|
||||||
|
bool 'Ash protocol family' HAVE_AFASH y
|
||||||
|
bool 'Bluetooth protocol family' HAVE_AFBLUETOOTH n
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Device Hardware types.
|
||||||
|
*
|
||||||
|
bool 'Ethernet (generic) support' HAVE_HWETHER y
|
||||||
|
bool 'ARCnet support' HAVE_HWARC y
|
||||||
|
bool 'SLIP (serial line) support' HAVE_HWSLIP y
|
||||||
|
bool 'PPP (serial line) support' HAVE_HWPPP y
|
||||||
|
bool 'IPIP Tunnel support' HAVE_HWTUNNEL y
|
||||||
|
bool 'STRIP (Metricom radio) support' HAVE_HWSTRIP n
|
||||||
|
bool 'Token ring (generic) support' HAVE_HWTR n
|
||||||
|
bool 'AX25 (packet radio) support' HAVE_HWAX25 y
|
||||||
|
bool 'Rose (packet radio) support' HAVE_HWROSE y
|
||||||
|
bool 'NET/ROM (packet radio) support' HAVE_HWNETROM y
|
||||||
|
bool 'X.25 (generic) support' HAVE_HWX25 y
|
||||||
|
bool 'DLCI/FRAD (frame relay) support' HAVE_HWFR y
|
||||||
|
bool 'SIT (IPv6-in-IPv4) support' HAVE_HWSIT y
|
||||||
|
bool 'FDDI (generic) support' HAVE_HWFDDI y
|
||||||
|
bool 'HIPPI (generic) support' HAVE_HWHIPPI y
|
||||||
|
bool 'Ash hardware support' HAVE_HWASH y
|
||||||
|
bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB y
|
||||||
|
bool 'IrDA support' HAVE_HWIRDA y
|
||||||
|
bool 'Econet hardware support' HAVE_HWEC y
|
||||||
|
bool 'Generic EUI-64 hardware support' HAVE_HWEUI64 y
|
||||||
|
bool 'InfiniBand hardware support' HAVE_HWIB y
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Other Features.
|
||||||
|
*
|
||||||
|
bool 'IP Masquerading support' HAVE_FW_MASQUERADE y
|
||||||
|
bool 'Build iptunnel and ipmaddr' HAVE_IP_TOOLS y
|
||||||
|
bool 'Build mii-tool' HAVE_MII y
|
||||||
|
bool 'SELinux support' HAVE_SELINUX n
|
122
net-tools.spec
Normal file
122
net-tools.spec
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
Name: net-tools
|
||||||
|
Version: 1.60.20130916git
|
||||||
|
Release: 1mamba
|
||||||
|
Summary: The basic tools for setting up networking.
|
||||||
|
Group: Applications/Networking
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
|
URL: http://freshmeat.net/projects/net-tools/
|
||||||
|
Source: git://git.code.sf.net/p/net-tools/code.git/master/code-%{version}.tar.bz2
|
||||||
|
#Source: http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-%{version}.tar.bz2
|
||||||
|
Source1: net-tools-1.60.20130916git-config.in
|
||||||
|
Patch1: %{name}-1.60-miitool-gcc33-1.patch
|
||||||
|
Patch2: %{name}-1.60-envpath.patch
|
||||||
|
Patch3: %{name}-1.60-arp-1.patch
|
||||||
|
Patch4: %{name}-1.60-gcc4.patch
|
||||||
|
Patch5: %{name}-1.60-ipv6-1.patch
|
||||||
|
Patch6: %{name}-1.60-kernel_headers-3.patch
|
||||||
|
Patch7: %{name}-1.60-nameif-2.patch
|
||||||
|
Patch8: %{name}-1.60-virtualname-1.patch
|
||||||
|
Patch9: %{name}-1.60-kernel2.6.29.patch
|
||||||
|
License: GPL
|
||||||
|
Requires: inetutils
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
%description
|
||||||
|
The net-tools package contains the basic tools needed for setting up networking: ifconfig, netstat, route and others.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%setup -q -n code-%{version}
|
||||||
|
#%patch1 -p 1
|
||||||
|
%patch2 -p 1
|
||||||
|
#%patch3 -p 1
|
||||||
|
#%patch4 -p 1
|
||||||
|
#%patch5 -p 1
|
||||||
|
#%patch6 -p 1
|
||||||
|
#%patch7 -p 1
|
||||||
|
#%patch8 -p 1
|
||||||
|
#%patch9 -p 1
|
||||||
|
|
||||||
|
%build
|
||||||
|
cp %{SOURCE1} ./config.in
|
||||||
|
|
||||||
|
yes "" | make \
|
||||||
|
CC=%{_target_platform}-gcc \
|
||||||
|
AR=%{_target_platform}-ar
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
make update BASEDIR=%{buildroot}/ \
|
||||||
|
CC=%{_target_platform}-gcc \
|
||||||
|
AR=%{_target_platform}-ar
|
||||||
|
|
||||||
|
# compatibility symlinks
|
||||||
|
ln -sf ../bin/route %{buildroot}/sbin/route
|
||||||
|
ln -sf ../bin/ifconfig %{buildroot}/sbin/ifconfig
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
/bin/dnsdomainname
|
||||||
|
/bin/domainname
|
||||||
|
/bin/hostname
|
||||||
|
/bin/ifconfig
|
||||||
|
/bin/netstat
|
||||||
|
/bin/nisdomainname
|
||||||
|
/bin/ypdomainname
|
||||||
|
/bin/route
|
||||||
|
/sbin/arp
|
||||||
|
/sbin/ifconfig
|
||||||
|
/sbin/ipmaddr
|
||||||
|
/sbin/iptunnel
|
||||||
|
/sbin/mii-tool
|
||||||
|
/sbin/nameif
|
||||||
|
/sbin/plipconfig
|
||||||
|
/sbin/rarp
|
||||||
|
/sbin/route
|
||||||
|
/sbin/slattach
|
||||||
|
%{_mandir}/man1/dnsdomainname.*
|
||||||
|
%{_mandir}/man1/domainname.*
|
||||||
|
%{_mandir}/man1/nisdomainname.*
|
||||||
|
%{_mandir}/man1/ypdomainname.*
|
||||||
|
%{_mandir}/man1/hostname.1*
|
||||||
|
%{_mandir}/man5/*
|
||||||
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Sep 16 2013 Automatic Build System <autodist@mambasoft.it> 1.60.20130916git-1mamba
|
||||||
|
- update to 1.60.20130916git
|
||||||
|
|
||||||
|
* Thu Apr 21 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.60-9mamba
|
||||||
|
- don't exclude hostname, use this instead of the one from inetutils package
|
||||||
|
|
||||||
|
* Mon Jul 12 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 1.60-8mamba
|
||||||
|
- excluded hostname and ifconfig provided by inettools
|
||||||
|
- added requirement for inettools for upgrade compatibility
|
||||||
|
|
||||||
|
* Thu Mar 25 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 1.60-7mamba
|
||||||
|
- added patch to build with current kernel headers
|
||||||
|
|
||||||
|
* Mon Jul 16 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 1.60-6mamba
|
||||||
|
- added URL entry
|
||||||
|
- added kernel_headers, nameif, virtualname,arp and ipv6 patches
|
||||||
|
|
||||||
|
* Tue Sep 13 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 1.60-5qilnx
|
||||||
|
- cross platform build support
|
||||||
|
- added gcc4 patch
|
||||||
|
|
||||||
|
* Tue Mar 09 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 1.60-4qilnx
|
||||||
|
- rebuild with mii support, packet radio and others (no decnet yet, it needs libdnet)
|
||||||
|
|
||||||
|
* Mon Dec 15 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 1.60-3qilnx
|
||||||
|
- enabled ipv6 support
|
||||||
|
- patch for gcc 3.3 applied
|
||||||
|
|
||||||
|
* Mon Apr 14 2003 Alessandro Ramazzina <alessandro.ramazzina@qinet.it> 1.60-1qilnx
|
||||||
|
- Creation of net-tools package
|
Loading…
Reference in New Issue
Block a user